linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] omap2/ompafb/omapfb-main.c: Delete if evaluating constant.
@ 2012-11-16 17:51 Matthias Brugger
  2012-11-19 11:14 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Brugger @ 2012-11-16 17:51 UTC (permalink / raw)
  To: Tomi Valkeinen, Tony Lindgren, linux-omap; +Cc: Matthias Brugger

Variable r is never set to any value different to zero.
Delete the if statement as it will never executed.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
---
 drivers/video/omap2/omapfb/omapfb-main.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 16db158..85f9de0 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2411,7 +2411,6 @@ static int __init omapfb_probe(struct platform_device *pdev)
 	fbdev->dev = &pdev->dev;
 	platform_set_drvdata(pdev, fbdev);
 
-	r = 0;
 	fbdev->num_displays = 0;
 	dssdev = NULL;
 	for_each_dss_dev(dssdev) {
@@ -2434,9 +2433,6 @@ static int __init omapfb_probe(struct platform_device *pdev)
 			d->update_mode = OMAPFB_AUTO_UPDATE;
 	}
 
-	if (r)
-		goto cleanup;
-
 	if (fbdev->num_displays == 0) {
 		dev_err(&pdev->dev, "no displays\n");
 		r = -EINVAL;
-- 
1.7.9.5


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

* Re: [PATCH] omap2/ompafb/omapfb-main.c: Delete if evaluating constant.
  2012-11-16 17:51 [PATCH] omap2/ompafb/omapfb-main.c: Delete if evaluating constant Matthias Brugger
@ 2012-11-19 11:14 ` Tomi Valkeinen
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2012-11-19 11:14 UTC (permalink / raw)
  To: Matthias Brugger; +Cc: Tony Lindgren, linux-omap, Matthias Brugger

[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]

On 2012-11-16 19:51, Matthias Brugger wrote:
> Variable r is never set to any value different to zero.
> Delete the if statement as it will never executed.
> 
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
>  drivers/video/omap2/omapfb/omapfb-main.c |    4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
> index 16db158..85f9de0 100644
> --- a/drivers/video/omap2/omapfb/omapfb-main.c
> +++ b/drivers/video/omap2/omapfb/omapfb-main.c
> @@ -2411,7 +2411,6 @@ static int __init omapfb_probe(struct platform_device *pdev)
>  	fbdev->dev = &pdev->dev;
>  	platform_set_drvdata(pdev, fbdev);
>  
> -	r = 0;
>  	fbdev->num_displays = 0;
>  	dssdev = NULL;
>  	for_each_dss_dev(dssdev) {
> @@ -2434,9 +2433,6 @@ static int __init omapfb_probe(struct platform_device *pdev)
>  			d->update_mode = OMAPFB_AUTO_UPDATE;
>  	}
>  
> -	if (r)
> -		goto cleanup;
> -
>  	if (fbdev->num_displays == 0) {
>  		dev_err(&pdev->dev, "no displays\n");
>  		r = -EINVAL;
> 

Thanks, I'll apply to omapdss tree.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 897 bytes --]

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

end of thread, other threads:[~2012-11-19 11:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16 17:51 [PATCH] omap2/ompafb/omapfb-main.c: Delete if evaluating constant Matthias Brugger
2012-11-19 11:14 ` Tomi Valkeinen

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).