diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2017-11-09 18:09:31 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-11-09 18:09:31 +0100 |
commit | ffb66624caa4db72e3a00aba8d27862395173b20 (patch) | |
tree | 6c7d2b48e206ebed65450f4a62e5e8830bac2db4 /drivers/video/fbdev/sm501fb.c | |
parent | 35bfbf70b2928ce5fbc117a410915eeee457202b (diff) | |
download | linux-ffb66624caa4db72e3a00aba8d27862395173b20.tar.bz2 |
sm501fb: suspend and resume fb if it exists
There are cases when panel and crt both are not defined and only one of
them is defined and initialized. In such cases, suspend or resume it
only if it is defined.
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/sm501fb.c')
-rw-r--r-- | drivers/video/fbdev/sm501fb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c index 577a48339bab..49233c192662 100644 --- a/drivers/video/fbdev/sm501fb.c +++ b/drivers/video/fbdev/sm501fb.c @@ -2101,6 +2101,9 @@ static int sm501fb_suspend_fb(struct sm501fb_info *info, struct fb_info *fbi = info->fb[head]; struct sm501fb_par *par = fbi->par; + if (!fbi) + return 0; + if (par->screen.size == 0) return 0; @@ -2148,6 +2151,9 @@ static void sm501fb_resume_fb(struct sm501fb_info *info, struct fb_info *fbi = info->fb[head]; struct sm501fb_par *par = fbi->par; + if (!fbi) + return; + if (par->screen.size == 0) return; |