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 <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
Wei Yongjun 2017-02-08 16:43:59 +01:00 • committed by Bartlomiej Zolnierkiewicz
commit b49898ce60

View file

@ -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) {