Commit e6d42f0e authored by Satyam Sharma's avatar Satyam Sharma Committed by Greg Kroah-Hartman

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: default avatarSatyam Sharma <satyam@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5adceac5
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment