From 464e8ad733fa6afee028607d6e7d4663b4c273cc Mon Sep 17 00:00:00 2001 From: Oliver McFadden Date: Thu, 16 Jul 2009 17:51:08 +0300 Subject: [PATCH] Coverity Prevent: NEGATIVE_RETURNS in fbdev_open_pci: Event var_tested_neg: Variable "fd" tested NEGATIVE At conditional (1): "fd != -1" taking false path 335 if (fd != -1) { Event negative_returns: Tracked variable "fd" was passed to a negative sink. 347 close(fd); --- hw/xfree86/fbdevhw/fbdevhw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c index a58549114..2b7e36a24 100644 --- a/hw/xfree86/fbdevhw/fbdevhw.c +++ b/hw/xfree86/fbdevhw/fbdevhw.c @@ -342,10 +342,9 @@ fbdev_open_pci(struct pci_device * pPci, char **namep) return fd; } + close(fd); } } - - close(fd); }