video: fbdev: sh_mobile_lcdcfb: fix error return code in sh_mobile_lcdc_probe()
PATCH v2 1/1 video: fbdev: sh_mobile_lcdcfb: fix error return code in sh_mobile_lcdc_probe()
From: Wei Yongjun <[email protected]>
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 <[email protected]>
Reviewed-by Geert Uytterhoeven <[email protected]>
---v1->v2: use -ENOMEM intead of -ENODEV
--- drivers/video/fbdev/sh_mobile_lcdcfb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/video/fbdev/sh_mobile_lcdcfb.c +3 -1
@@ -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) {
Hi,
Quoted 7 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Fix to return error code
-ENOMEMfrom theioremap_nocache()error handling case instead of 0, as done elsewhere in this function.Signed-off-by Wei Yongjun <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>
Patch queued for 4.11, thanks.
Quoted 12 lines
---
v1->v2: use-ENOMEMintead of-ENODEV--- drivers/video/fbdev/sh_mobile_lcdcfb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/video/fbdev/sh_mobile_lcdcfb.c +0
-0@@ -2782,8 +2782,10 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev) priv->forced_fourcc = pdata->ch[0 ].fourcc;
drivers/video/fbdev/sh_mobile_lcdcfb.c static int sh_mobile_lcdc_probe(struct platform_device *pdev) · line 2791
Quoted 10 lines
drivers/video/fbdev/sh_mobile_lcdcfb.c +3
-1priv->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) {
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics