提交 003c4dc6 编写于 作者: A Alan Stern 提交者: Xie XiuQi

media: usb: siano: Fix false-positive "uninitialized variable" warning

commit 45457c01171fd1488a7000d1751c06ed8560ee38 upstream.

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: NAlan Stern <stern@rowland.harvard.edu>
Reported-by: Nkbuild test robot <lkp@intel.com>
CC: <stable@vger.kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 400e57fa
...@@ -401,7 +401,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id) ...@@ -401,7 +401,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id)
struct smsusb_device_t *dev; struct smsusb_device_t *dev;
void *mdev; void *mdev;
int i, rc; int i, rc;
int in_maxp; int in_maxp = 0;
/* create device object */ /* create device object */
dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL); dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册