linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next v2] video: fbdev: sh_mobile_lcdcfb: fix error return code in sh_mobile_lcdc_probe()
@ 2017-02-06 15:08 Wei Yongjun
  2017-02-08 14:52 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2017-02-06 15:08 UTC (permalink / raw)
  To: linux-fbdev

From: Wei Yongjun <weiyongjun1@huawei.com>

Fix to return error code -ENOMEM from the ioremap_nocache() error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v2: use -ENOMEM intead of -ENODEV
---
 drivers/video/fbdev/sh_mobile_lcdcfb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
index 93469f9..ea8b6d5 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) {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-08 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-06 15:08 [PATCH -next v2] video: fbdev: sh_mobile_lcdcfb: fix error return code in sh_mobile_lcdc_probe() Wei Yongjun
2017-02-08 14:52 ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).