'ret' is known to be 0 here.
No error code is available, so just remove it from the error message.
Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref")
Signed-off-by: Christophe JAILLET <redacted>
---
drivers/video/fbdev/imxfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -992,7 +992,7 @@ static int imxfb_probe(struct platform_device *pdev)info->screen_buffer=dma_alloc_wc(&pdev->dev,fbi->map_size,&fbi->map_dma,GFP_KERNEL);if(!info->screen_buffer){-dev_err(&pdev->dev,"Failed to allocate video RAM: %d\n",ret);+dev_err(&pdev->dev,"Failed to allocate video RAM\n");ret=-ENOMEM;gotofailed_map;}
Hello Christophe,
On Thu, May 06, 2021 at 08:57:05PM +0200, Christophe JAILLET wrote:
quoted hunk
'ret' is known to be 0 here.
No error code is available, so just remove it from the error message.
Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref")
Signed-off-by: Christophe JAILLET <redacted>
---
drivers/video/fbdev/imxfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -992,7 +992,7 @@ static int imxfb_probe(struct platform_device *pdev)info->screen_buffer=dma_alloc_wc(&pdev->dev,fbi->map_size,&fbi->map_dma,GFP_KERNEL);if(!info->screen_buffer){-dev_err(&pdev->dev,"Failed to allocate video RAM: %d\n",ret);+dev_err(&pdev->dev,"Failed to allocate video RAM\n");ret=-ENOMEM;gotofailed_map;}
Reviewed-by: Uwe Kleine-König <redacted>
Are you using this driver, or did you find that problem using some
static checker?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Hello Christophe,
On Thu, May 06, 2021 at 08:57:05PM +0200, Christophe JAILLET wrote:
quoted
'ret' is known to be 0 here.
No error code is available, so just remove it from the error message.
Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref")
Signed-off-by: Christophe JAILLET <redacted>
---
drivers/video/fbdev/imxfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -992,7 +992,7 @@ static int imxfb_probe(struct platform_device *pdev)info->screen_buffer=dma_alloc_wc(&pdev->dev,fbi->map_size,&fbi->map_dma,GFP_KERNEL);if(!info->screen_buffer){-dev_err(&pdev->dev,"Failed to allocate video RAM: %d\n",ret);+dev_err(&pdev->dev,"Failed to allocate video RAM\n");ret=-ENOMEM;gotofailed_map;}
Reviewed-by: Uwe Kleine-König <redacted>
Are you using this driver, or did you find that problem using some
static checker?
No, I'm not using this driver AFAIK.
It has been spotted by coccinelle with a hand-made script which tries to
find places where error code is used before being initialized.
The script in it-self is not really interesting. It is easy to write and
my own version trigger way to much false positives.
CJ
Hello Christophe,
[dropping krzysztof.h1@poczta.fm from recipents, the address doesn't
seem to exist]
On Fri, May 07, 2021 at 09:11:19AM +0200, Christophe JAILLET wrote:
Le 07/05/2021 à 07:05, Uwe Kleine-König a écrit :
quoted
On Thu, May 06, 2021 at 08:57:05PM +0200, Christophe JAILLET wrote:
quoted
'ret' is known to be 0 here.
No error code is available, so just remove it from the error message.
Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref")
Signed-off-by: Christophe JAILLET <redacted>
---
drivers/video/fbdev/imxfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -992,7 +992,7 @@ static int imxfb_probe(struct platform_device *pdev)info->screen_buffer=dma_alloc_wc(&pdev->dev,fbi->map_size,&fbi->map_dma,GFP_KERNEL);if(!info->screen_buffer){-dev_err(&pdev->dev,"Failed to allocate video RAM: %d\n",ret);+dev_err(&pdev->dev,"Failed to allocate video RAM\n");ret=-ENOMEM;gotofailed_map;}
Reviewed-by: Uwe Kleine-König <redacted>
Are you using this driver, or did you find that problem using some
static checker?
No, I'm not using this driver AFAIK.
OK, thanks. (We're working on a DRM driver for this hardware. So you
could have been an interested tester.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
From: Daniel Vetter <hidden> Date: 2021-05-07 16:34:41
On Fri, May 07, 2021 at 07:05:03AM +0200, Uwe Kleine-König wrote:
Hello Christophe,
On Thu, May 06, 2021 at 08:57:05PM +0200, Christophe JAILLET wrote:
quoted
'ret' is known to be 0 here.
No error code is available, so just remove it from the error message.
Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref")
Signed-off-by: Christophe JAILLET <redacted>
---
drivers/video/fbdev/imxfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -992,7 +992,7 @@ static int imxfb_probe(struct platform_device *pdev)info->screen_buffer=dma_alloc_wc(&pdev->dev,fbi->map_size,&fbi->map_dma,GFP_KERNEL);if(!info->screen_buffer){-dev_err(&pdev->dev,"Failed to allocate video RAM: %d\n",ret);+dev_err(&pdev->dev,"Failed to allocate video RAM\n");ret=-ENOMEM;gotofailed_map;}
Reviewed-by: Uwe Kleine-König <redacted>
Thanks for patch& review, queued for 5.14 in drm-misc-next.
-Daniel
Are you using this driver, or did you find that problem using some
static checker?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |