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>
This commit is contained in:
Peter Huewe 2013-02-03 22:54:33 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель 8cedcc7022
Коммит fd1bbbb79e
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -1921,6 +1921,7 @@ static int xgifb_probe(struct pci_dev *pdev,
if (xgifb_info->mode_idx < 0) { if (xgifb_info->mode_idx < 0) {
dev_err(&pdev->dev, "No supported video mode found\n"); dev_err(&pdev->dev, "No supported video mode found\n");
ret = -EINVAL;
goto error_1; goto error_1;
} }