OSDN Git Service

staging/xgifb: Fix return of uninitialized variable
authorPeter Huewe <peterhuewe@gmx.de>
Sun, 3 Feb 2013 21:54:33 +0000 (22:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Feb 2013 18:46:27 +0000 (10:46 -0800)
commitfd1bbbb79eff1a4381328049b375c80c3fc8bff9
treeefaac4c19171c1e79f6f8f204c74033f469d0ec9
parent8cedcc7022e40fa83339257e82e64754ca1c8b9a
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>
drivers/staging/xgifb/XGI_main_26.c