]> err.no Git - linux-2.6/commitdiff
libusual: change block scope variable to function scope
authorPete Zaitcev <zaitcev@redhat.com>
Fri, 9 Mar 2007 04:02:26 +0000 (20:02 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 27 Apr 2007 20:28:34 +0000 (13:28 -0700)
Someone changed the code to kthread and used his style instead of mine.

The problem with the block variables is that they provoke shadowing,
which is actually exactly what has happened in my other tree which
has the class patch.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/libusual.c

index 599ad10a761b703da02f989eb51a88d0941ae0fd..06d1107dbd47e65eb85d8db1d6a40aa441fe4ec5 100644 (file)
@@ -117,6 +117,7 @@ EXPORT_SYMBOL_GPL(usb_usual_check_type);
 static int usu_probe(struct usb_interface *intf,
                         const struct usb_device_id *id)
 {
+       int rc;
        unsigned long type;
        struct task_struct* task;
        unsigned long flags;
@@ -135,7 +136,7 @@ static int usu_probe(struct usb_interface *intf,
 
        task = kthread_run(usu_probe_thread, (void*)type, "libusual_%d", type);
        if (IS_ERR(task)) {
-               int rc = PTR_ERR(task);
+               rc = PTR_ERR(task);
                printk(KERN_WARNING "libusual: "
                    "Unable to start the thread for %s: %d\n",
                    bias_names[type], rc);