From: Antonino A. Daplas Date: Mon, 26 Jun 2006 07:26:44 +0000 (-0700) Subject: [PATCH] fbdev: Coverity Bug 90 X-Git-Tag: v2.6.18-rc1~701 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17cc6281c12b26425209c58e3d8825a9568db3cc;p=linux-2.6 [PATCH] fbdev: Coverity Bug 90 It's a false positive, but let's suppress it anyway. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index 1aa36d302a..7e539b69a9 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c @@ -791,8 +791,9 @@ struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, 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;