[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1359928479-8484-4-git-send-email-peterhuewe@gmx.de>
Date: Sun, 3 Feb 2013 22:54:33 +0100
From: Peter Huewe <peterhuewe@....de>
To: Arnaud Patard <arnaud.patard@...-net.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Miguel Gómez <magomez@...lia.com>,
Aaro Koskinen <aaro.koskinen@....fi>,
Peter Huewe <peterhuewe@....de>,
Sam Hansen <solid.se7en@...il.com>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 04/10] staging/xgifb: Fix return of uninitialized variable
Clang warning:
drivers/staging/xgifb/XGI_main_26.c: warning: variable 'ret' is
used uninitialized whenever 'if' condition:
if (xgifb_info->mode_idx < 0) {
evaluates to true.
drivers/staging/xgifb/XGI_main_26.c:
note: uninitialized use occurs here
return ret;
This patch initializes the variable in this case.
Signed-off-by: Peter Huewe <peterhuewe@....de>
---
drivers/staging/xgifb/XGI_main_26.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index fa351f9..106abc8 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1921,6 +1921,7 @@ static int xgifb_probe(struct pci_dev *pdev,
if (xgifb_info->mode_idx < 0) {
dev_err(&pdev->dev, "No supported video mode found\n");
+ ret = -EINVAL;
goto error_1;
}
--
1.7.8.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists