Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
Bartlomiej Zolnierkiewicz
b49898ce 8d225568

+3 -1
+3 -1
drivers/video/fbdev/sh_mobile_lcdcfb.c
··· 2782 2782 priv->forced_fourcc = pdata->ch[0].fourcc; 2783 2783 2784 2784 priv->base = ioremap_nocache(res->start, resource_size(res)); 2785 - if (!priv->base) 2785 + if (!priv->base) { 2786 + error = -ENOMEM; 2786 2787 goto err1; 2788 + } 2787 2789 2788 2790 error = sh_mobile_lcdc_setup_clocks(priv, pdata->clock_source); 2789 2791 if (error) {