User: | Jiri Slaby |
Error type: | Leaving function in locked state |
Error type description: | Some lock is not unlocked on all paths of a function, so it is leaked |
File location: | drivers/usb/storage/usb.c |
Line in file: | 246 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-05-21 20:30:05 UTC |
216 217static int storage_reset_resume(struct usb_interface *iface) 218{ 219 struct us_data *us = usb_get_intfdata(iface); 220 221 US_DEBUGP("%s\n", __func__); 222 223 /* Report the reset to the SCSI core */ 224 usb_stor_report_bus_reset(us); 225 226 /* FIXME: Notify the subdrivers that they need to reinitialize 227 * the device */ 228 return 0; 229} 230 231#endif /* CONFIG_PM */ 232 233/* 234 * The next two routines get called just before and just after 235 * a USB port reset, whether from this driver or a different one. 236 */ 237 238static int storage_pre_reset(struct usb_interface *iface) 239{ 240 struct us_data *us = usb_get_intfdata(iface); 241 242 US_DEBUGP("%s\n", __func__); 243 244 /* Make sure no command runs during the reset */ 245 mutex_lock(&us->dev_mutex); 246 return 0; 247} 248 249static int storage_post_reset(struct usb_interface *iface) 250{ 251 struct us_data *us = usb_get_intfdata(iface); 252 253 US_DEBUGP("%s\n", __func__); 254 255 /* Report the reset to the SCSI core */ 256 usb_stor_report_bus_reset(us);