Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libusual: change block scope variable to function scope

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>

authored by

Pete Zaitcev and committed by
Greg Kroah-Hartman
64e35d92 643616e6

+2 -1
+2 -1
drivers/usb/storage/libusual.c
··· 117 117 static int usu_probe(struct usb_interface *intf, 118 118 const struct usb_device_id *id) 119 119 { 120 + int rc; 120 121 unsigned long type; 121 122 struct task_struct* task; 122 123 unsigned long flags; ··· 136 135 137 136 task = kthread_run(usu_probe_thread, (void*)type, "libusual_%d", type); 138 137 if (IS_ERR(task)) { 139 - int rc = PTR_ERR(task); 138 + rc = PTR_ERR(task); 140 139 printk(KERN_WARNING "libusual: " 141 140 "Unable to start the thread for %s: %d\n", 142 141 bias_names[type], rc);