]> asedeno.scripts.mit.edu Git - linux.git/commit
usb-storage: make use of srb local variable
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 25 Oct 2017 14:40:05 +0000 (10:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Nov 2017 15:57:23 +0000 (16:57 +0100)
commit32bf9fd50ff439184ddcf925cfb3c6bc0138f7c5
treea4c77840d24897b0e11e5cc2ebca9113016c30ef
parentf93de0c27e87ad3d28ddd094a46bbf294183a71e
usb-storage: make use of srb local variable

Commit 8b52291a0743 ("usb-storage: fix deadlock involving host lock
and scsi_done") added a local variable to usb_stor_control_thread() in
the usb-storage driver.  This local variable holds the value of
us->srb, for use after the host lock has been released.

But as long as we have the value in a local variable, we may as well
use it instead of dereferencing the us pointer all over the place.
This patch makes no functional change; it just makes the code a little
shorter and a little neater.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/usb.c