Skip to contentSkip to conversation

omap2/ompafb/omapfb-main.c: Delete if evaluating constant.

PATCH In review Matthias Brugger 2 participants 2 messages Nov 16, 2012 – Nov 19, 2012 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omap2/ompafb/omapfb-main.c: Delete if evaluating constant.

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

---
 drivers/video/omap2/omapfb/omapfb-main.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/video/omap2/omapfb/omapfb-main.c +0 -4
index 16db158..85f9de0 100644
@@ -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;
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 22 lines · Matthias Brugger

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

---
 drivers/video/omap2/omapfb/omapfb-main.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/video/omap2/omapfb/omapfb-main.c +0 -1
index 16db158..85f9de0 100644
@@ -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) {

drivers/video/omap2/omapfb/omapfb-main.c static int __init omapfb_probe(struct platform_device *pdev) · line 2438

Quoted 9 lines
drivers/video/omap2/omapfb/omapfb-main.c +0 -3
@@ -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