This Linux kernel change "media: usb: siano: Fix false-positive “uninitialized variable” warning" is included in the Linux 5.2 release. This change is authored by Alan Stern <stern [at] rowland.harvard.edu> on Tue May 21 11:38:07 2019 -0400. The commit for this change in Linux stable tree is 45457c0 (patch).
media: usb: siano: Fix false-positive "uninitialized variable" warning GCC complains about an apparently uninitialized variable recently added to smsusb_init_device(). It's a false positive, but to silence the warning this patch adds a trivial initialization. Signed-off-by: Alan Stern <[email protected]> Reported-by: kbuild test robot <[email protected]> CC: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.
drivers/media/usb/siano/smsusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c index 27ad14a..59b3c12 100644 --- a/drivers/media/usb/siano/smsusb.c +++ b/drivers/media/usb/siano/smsusb.c @@ -400,7 +400,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id) struct smsusb_device_t *dev; void *mdev; int i, rc; - int in_maxp; + int in_maxp = 0; /* create device object */ dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL);