提交 b49898ce 编写于 作者: W Wei Yongjun 提交者: Bartlomiej Zolnierkiewicz

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: NWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
上级 8d225568
...@@ -2782,8 +2782,10 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev) ...@@ -2782,8 +2782,10 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev)
priv->forced_fourcc = pdata->ch[0].fourcc; priv->forced_fourcc = pdata->ch[0].fourcc;
priv->base = ioremap_nocache(res->start, resource_size(res)); priv->base = ioremap_nocache(res->start, resource_size(res));
if (!priv->base) if (!priv->base) {
error = -ENOMEM;
goto err1; goto err1;
}
error = sh_mobile_lcdc_setup_clocks(priv, pdata->clock_source); error = sh_mobile_lcdc_setup_clocks(priv, pdata->clock_source);
if (error) { if (error) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册