From: Alan Stern <stern@rowland.harvard.edu>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kbuild test robot <lkp@intel.com>, <kbuild-all@01.org>,
USB list <linux-usb@vger.kernel.org>,
Johan Hovold <johan@kernel.org>
Subject: [PATCH] media: usb: siano: Fix false-positive "uninitialized variable" warning
Date: Tue, 21 May 2019 11:38:07 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.44L0.1905211136260.1634-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <20190521140805.GA24615@kroah.com>
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 <stern@rowland.harvard.edu>
Reported-by: kbuild test robot <lkp@intel.com>
CC: <stable@vger.kernel.org>
---
drivers/media/usb/siano/smsusb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: usb-devel/drivers/media/usb/siano/smsusb.c
===================================================================
--- usb-devel.orig/drivers/media/usb/siano/smsusb.c
+++ usb-devel/drivers/media/usb/siano/smsusb.c
@@ -400,7 +400,7 @@ static int smsusb_init_device(struct usb
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);
prev parent reply other threads:[~2019-05-21 15:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 8:48 [usb:usb-linus 3/10] drivers/media//usb/siano/smsusb.c:447:37: warning: 'in_maxp' may be used uninitialized in this function kbuild test robot
2019-05-21 13:09 ` Greg Kroah-Hartman
2019-05-21 13:49 ` Alan Stern
2019-05-21 14:08 ` Greg Kroah-Hartman
2019-05-21 15:38 ` Alan Stern [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44L0.1905211136260.1634-100000@iolanthe.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=kbuild-all@01.org \
--cc=linux-usb@vger.kernel.org \
--cc=lkp@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.