summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2017-02-08 16:43:59 +0100
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2017-02-08 16:43:59 +0100
commitb49898ce606da268fa28fef40260cad8a20ce7b0 (patch)
treefe59de852cc993fa233b43436b39f7e17a556ab8 /drivers/video
parentvideo: fbdev: offb: switch to using for_each_node_by_type (diff)
downloadlinux-b49898ce606da268fa28fef40260cad8a20ce7b0.tar.xz
linux-b49898ce606da268fa28fef40260cad8a20ce7b0.zip
video: fbdev: sh_mobile_lcdcfb: fix error return code in sh_mobile_lcdc_probe()
Fix to return error code -ENOMEM from the ioremap_nocache() error handling case instead of 0, as done elsewhere in this function. Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/sh_mobile_lcdcfb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
index 93469f94c09d..885ee3a563aa 100644
--- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
+++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
@@ -2782,8 +2782,10 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev)
priv->forced_fourcc = pdata->ch[0].fourcc;
priv->base = ioremap_nocache(res->start, resource_size(res));
- if (!priv->base)
+ if (!priv->base) {
+ error = -ENOMEM;
goto err1;
+ }
error = sh_mobile_lcdc_setup_clocks(priv, pdata->clock_source);
if (error) {