[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.999.0709030136140.29617@enigma.security.iitk.ac.in>
Date: Mon, 3 Sep 2007 01:37:31 +0530 (IST)
From: Satyam Sharma <satyam@...radead.org>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
cc: Thomas Winischhofer <thomas@...ischhofer.net>,
Greg Kroah-Hartman <greg@...ah.com>,
linux-usb-devel@...ts.sourceforge.net
Subject: [PATCH -mm] sisusbvga: Fix bug and build warnings
drivers/usb/misc/sisusbvga/sisusb.c: In function ‘usb_sisusb_init’:
drivers/usb/misc/sisusbvga/sisusb.c:3321: warning: unused variable ‘sisusb’
drivers/usb/misc/sisusbvga/sisusb.c:3320: warning: unused variable ‘retval’
are trivially solved by getting rid of the unused variables.
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@...radead.org>
---
drivers/usb/misc/sisusbvga/sisusb.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--- linux-2.6.23-rc4-mm1/drivers/usb/misc/sisusbvga/sisusb.c‾fix 2007-09-02 19:06:01.000000000 +0530
+++ linux-2.6.23-rc4-mm1/drivers/usb/misc/sisusbvga/sisusb.c 2007-09-02 19:10:52.000000000 +0530
@@ -2440,10 +2440,8 @@ sisusb_open(struct inode *inode, struct
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;
@@ -3317,9 +3315,6 @@ static struct usb_driver sisusb_driver =
static int __init usb_sisusb_init(void)
{
- int retval;
- struct sisusb_usb_data *sisusb;
-
#ifdef INCL_SISUSB_CON
sisusb_init_concode();
#endif
Powered by blists - more mailing lists