Re: [PATCH] drivers: video: mxsfb: clean use of devm_ioremap_resource()

From
Laurent Navet <hidden>
Date
2013-05-16 09:46:23
Also in
lkml
Reply to
Jingoo Han, 2013-05-16
2013/5/16, Jingoo Han [off-list ref]:
It makes build warning as below:

drivers/video/mxsfb.c:887:13: warning: 'host' is used uninitialized in this
function [-Wuninitialized]
drivers/video/mxsfb.c:965:21: warning: 'fb_info' may be used uninitialized
in this function [-Wuninitialized]

It breaks the assignment.
	host = to_imxfb_host(fb_info);

Also, 'goto fb_release;' is not good.
Please use ' return PTR_ERR(host->base);' as below:
+       host->base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(host->base))
+               return PTR_ERR(host->base);


Best regards,
Jingoo Han
Thank's for reviewing, I'll look at and resend.

Laurent,
Thread (3 messages) 3 messages, 2 authors, last reply 2013-05-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help