fbdev: Coverity Bug 90

Started by Antonino A. Daplas on May 4, 2006

Subsystems (2)

Maintainers (2)

DORMANTno replies

open the first message on its own page

Message details and related content
It's a false positive, but let's suppress it anyway.

Signed-off-by: Antonino Daplas <redacted>
---

 drivers/video/modedb.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index 1aa36d3..7e539b6 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -791,8 +791,9 @@ struct fb_videomode *fb_find_best_mode(s
 			if (diff > d) {
 				diff = d;
 				best = mode;
-			} else if (diff == d && mode->refresh > best->refresh)
-			    best = mode;
+			} else if (diff == d && best &&
+				   mode->refresh > best->refresh)
+				best = mode;
 		}
 	}
 	return best;



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
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