提交 91f58ae6 编写于 作者: H Huzaifa Sidhpurwala 提交者: Greg Kroah-Hartman

USB: serial: mos7720: Fix possible null pointer dereference

Signed-off-by: NHuzaifa Sidhpurwala <huzaifas@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 d866150a
......@@ -2052,7 +2052,7 @@ static int mos7720_startup(struct usb_serial *serial)
struct usb_device *dev;
int i;
char data;
u16 product = le16_to_cpu(serial->dev->descriptor.idProduct);
u16 product;
int ret_val;
dbg("%s: Entering ..........", __func__);
......@@ -2062,6 +2062,7 @@ static int mos7720_startup(struct usb_serial *serial)
return -ENODEV;
}
product = le16_to_cpu(serial->dev->descriptor.idProduct);
dev = serial->dev;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册