summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/sisusbvga/sisusb.c
diff options
context:
space:
mode:
authorSatyam Sharma <satyam@infradead.org>2007-09-03 00:07:31 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-13 01:55:25 +0400
commite6d42f0e962390e956545aa282efb05a9d6a41d1 (patch)
tree77dec05024647ac82094bd5e62fb6baf7d098307 /drivers/usb/misc/sisusbvga/sisusb.c
parent5adceac5da3d353dd1318d0482cab94a79472adf (diff)
downloadlinux-e6d42f0e962390e956545aa282efb05a9d6a41d1.tar.xz
USB: sisusbvga: Fix bug
drivers/usb/misc/sisusbvga/sisusb.c: In function sisusb_open drivers/usb/misc/sisusbvga/sisusb.c:2444: warning: sisusb is used uninitialized in this function is a genuine bug (which will cause oops). We cannot use "sisusb" in error path for (!interface), because sisusb will itself be derived from "interface" later. Signed-off-by: Satyam Sharma <satyam@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/sisusbvga/sisusb.c')
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 4d6b89336e63..033bdfe9b215 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -2440,10 +2440,8 @@ sisusb_open(struct inode *inode, struct file *file)
struct usb_interface *interface;
int subminor = iminor(inode);
- if (!(interface = usb_find_interface(&sisusb_driver, subminor))) {
- dev_err(&sisusb->sisusb_dev->dev, "Failed to find interface\n");
+ if (!(interface = usb_find_interface(&sisusb_driver, subminor)))
return -ENODEV;
- }
if (!(sisusb = usb_get_intfdata(interface)))
return -ENODEV;