aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorHuzaifa Sidhpurwala <huzaifas@redhat.com>2011-02-21 02:28:45 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-25 14:33:01 -0500
commit91f58ae61913b40da35e119017e70b3420c6f3a0 (patch)
tree1fe4028facedf2d99f16a0e0f9b2886f4b65f646 /drivers/usb/serial
parentd866150a1914453c3d57689adfd8d01bf741d9d4 (diff)
USB: serial: mos7720: Fix possible null pointer dereference
Signed-off-by: Huzaifa Sidhpurwala <huzaifas@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/mos7720.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 7d3bc9a3e2b6..ae506f4ee29d 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -2052,7 +2052,7 @@ static int mos7720_startup(struct usb_serial *serial)
2052 struct usb_device *dev; 2052 struct usb_device *dev;
2053 int i; 2053 int i;
2054 char data; 2054 char data;
2055 u16 product = le16_to_cpu(serial->dev->descriptor.idProduct); 2055 u16 product;
2056 int ret_val; 2056 int ret_val;
2057 2057
2058 dbg("%s: Entering ..........", __func__); 2058 dbg("%s: Entering ..........", __func__);
@@ -2062,6 +2062,7 @@ static int mos7720_startup(struct usb_serial *serial)
2062 return -ENODEV; 2062 return -ENODEV;
2063 } 2063 }
2064 2064
2065 product = le16_to_cpu(serial->dev->descriptor.idProduct);
2065 dev = serial->dev; 2066 dev = serial->dev;
2066 2067
2067 /* 2068 /*