Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd1bbbb7 authored by Peter Huewe's avatar Peter Huewe Committed by Greg Kroah-Hartman
Browse files

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: default avatarPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8cedcc70
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}