diff options
author | Peter Huewe <peterhuewe@gmx.de> | 2013-02-03 22:54:33 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-04 10:46:27 -0800 |
commit | fd1bbbb79eff1a4381328049b375c80c3fc8bff9 (patch) | |
tree | efaac4c19171c1e79f6f8f204c74033f469d0ec9 /drivers/staging/xgifb/XGI_main_26.c | |
parent | 8cedcc7022e40fa83339257e82e64754ca1c8b9a (diff) |
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@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb/XGI_main_26.c')
-rw-r--r-- | 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 fa351f90da33..106abc8d9cbb 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; } |