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

usb: remove junk from store_remove_id

retval is 0, and carefully assigned - and tested as non zero.

This is not useful. While we are at it remove some other bogus initialisation
in the function

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alan Cox and committed by
Greg Kroah-Hartman
ac08de32 2bcb132c

+3 -8
+3 -8
drivers/usb/core/driver.c
··· 125 125 { 126 126 struct usb_dynid *dynid, *n; 127 127 struct usb_driver *usb_driver = to_usb_driver(driver); 128 - u32 idVendor = 0; 129 - u32 idProduct = 0; 130 - int fields = 0; 131 - int retval = 0; 128 + u32 idVendor; 129 + u32 idProduct; 130 + int fields; 132 131 133 132 fields = sscanf(buf, "%x %x", &idVendor, &idProduct); 134 133 if (fields < 2) ··· 140 141 (id->idProduct == idProduct)) { 141 142 list_del(&dynid->node); 142 143 kfree(dynid); 143 - retval = 0; 144 144 break; 145 145 } 146 146 } 147 147 spin_unlock(&usb_driver->dynids.lock); 148 - 149 - if (retval) 150 - return retval; 151 148 return count; 152 149 } 153 150 static DRIVER_ATTR(remove_id, S_IRUGO | S_IWUSR, show_dynids, store_remove_id);