summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorDejin Zheng <zhengdejin5@gmail.com>2020-04-23 00:07:19 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-21 10:53:00 +0200
commit8d31a1d00dcb25876c82e3fc01ce8c706fa52241 (patch)
tree3250640e35a13bc91039e3266c07724ab282dabf /drivers/video
parentecef1cac30308a6975d0e6d41619839956a2d857 (diff)
video: fbdev: sm712fb: fix an issue about iounmap for a wrong address
[ Upstream commit 98bd4f72988646c35569e1e838c0ab80d06c77f6 ] the sfb->fb->screen_base is not save the value get by iounmap() when the chip id is 0x720. so iounmap() for address sfb->fb->screen_base is not right. Fixes: 1461d6672864854 ("staging: sm7xxfb: merge sm712fb with fbdev") Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200422160719.27763-1-zhengdejin5@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/sm712fb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c
index 589ac7e75413..c8ee58e0ae3e 100644
--- a/drivers/video/fbdev/sm712fb.c
+++ b/drivers/video/fbdev/sm712fb.c
@@ -1428,6 +1428,8 @@ static int smtc_map_smem(struct smtcfb_info *sfb,
static void smtc_unmap_smem(struct smtcfb_info *sfb)
{
if (sfb && sfb->fb->screen_base) {
+ if (sfb->chip_id == 0x720)
+ sfb->fb->screen_base -= 0x00200000;
iounmap(sfb->fb->screen_base);
sfb->fb->screen_base = NULL;
}