From: Satyam Sharma Date: Sun, 2 Sep 2007 20:07:31 +0000 (+0530) Subject: USB: sisusbvga: Fix bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6d42f0e962390e956545aa282efb05a9d6a41d1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- 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;