]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/media-usb-siano-fix-false-positive-uninitialized-variable-warning.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.19 / media-usb-siano-fix-false-positive-uninitialized-variable-warning.patch
1 From 45457c01171fd1488a7000d1751c06ed8560ee38 Mon Sep 17 00:00:00 2001
2 From: Alan Stern <stern@rowland.harvard.edu>
3 Date: Tue, 21 May 2019 11:38:07 -0400
4 Subject: media: usb: siano: Fix false-positive "uninitialized variable" warning
5
6 From: Alan Stern <stern@rowland.harvard.edu>
7
8 commit 45457c01171fd1488a7000d1751c06ed8560ee38 upstream.
9
10 GCC complains about an apparently uninitialized variable recently
11 added to smsusb_init_device(). It's a false positive, but to silence
12 the warning this patch adds a trivial initialization.
13
14 Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
15 Reported-by: kbuild test robot <lkp@intel.com>
16 CC: <stable@vger.kernel.org>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19 ---
20 drivers/media/usb/siano/smsusb.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23 --- a/drivers/media/usb/siano/smsusb.c
24 +++ b/drivers/media/usb/siano/smsusb.c
25 @@ -401,7 +401,7 @@ static int smsusb_init_device(struct usb
26 struct smsusb_device_t *dev;
27 void *mdev;
28 int i, rc;
29 - int in_maxp;
30 + int in_maxp = 0;
31
32 /* create device object */
33 dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL);