diff mbox series

[-next] video: fbdev: imxfb: fix a typo in imxfb_probe()

Message ID 20190704095225.143177-1-weiyongjun1@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] video: fbdev: imxfb: fix a typo in imxfb_probe() | expand

Commit Message

Wei Yongjun July 4, 2019, 9:52 a.m. UTC
Fix the return value check which testing the wrong variable
in imxfb_probe().

Fixes: 739a6439c2bf ("video: fbdev: imxfb: fix sparse warnings about using incorrect types")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/video/fbdev/imxfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bartlomiej Zolnierkiewicz July 5, 2019, 3:26 p.m. UTC | #1
On 7/4/19 11:52 AM, Wei Yongjun wrote:
> Fix the return value check which testing the wrong variable
> in imxfb_probe().

I added following comment while merging the patch:

b.zolnierkie: please note that ->screen_base and ->screen_buffer
are equivalent (they are part of unnamed union in struct fb_info)

> Fixes: 739a6439c2bf ("video: fbdev: imxfb: fix sparse warnings about using incorrect types")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Patch queued for v5.3, thanks.

> ---
>  drivers/video/fbdev/imxfb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
> index 8d1053e9ef9f..b3286d1fa543 100644
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -976,7 +976,7 @@ static int imxfb_probe(struct platform_device *pdev)
>  	fbi->map_size = PAGE_ALIGN(info->fix.smem_len);
>  	info->screen_buffer = dma_alloc_wc(&pdev->dev, fbi->map_size,
>  					   &fbi->map_dma, GFP_KERNEL);
> -	if (!info->screen_base) {
> +	if (!info->screen_buffer) {
>  		dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret);
>  		ret = -ENOMEM;
>  		goto failed_map;

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
diff mbox series

Patch

diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index 8d1053e9ef9f..b3286d1fa543 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -976,7 +976,7 @@  static int imxfb_probe(struct platform_device *pdev)
 	fbi->map_size = PAGE_ALIGN(info->fix.smem_len);
 	info->screen_buffer = dma_alloc_wc(&pdev->dev, fbi->map_size,
 					   &fbi->map_dma, GFP_KERNEL);
-	if (!info->screen_base) {
+	if (!info->screen_buffer) {
 		dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret);
 		ret = -ENOMEM;
 		goto failed_map;