mirror of
https://github.com/torvalds/linux.git
synced 2024-12-19 17:41:29 +00:00
USB: Storage: usbat_check_status(): fix check-after-use
The Coverity checker spotted that we have already oops'ed if "us" was NULL. Since "us" can't be NULL in the only caller this patch removes the NULL check. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
efc9052e01
commit
a96173af52
@ -190,9 +190,6 @@ static int usbat_check_status(struct us_data *us)
|
||||
unsigned char *reply = us->iobuf;
|
||||
int rc;
|
||||
|
||||
if (!us)
|
||||
return USB_STOR_TRANSPORT_ERROR;
|
||||
|
||||
rc = usbat_get_status(us, reply);
|
||||
if (rc != USB_STOR_XFER_GOOD)
|
||||
return USB_STOR_TRANSPORT_FAILED;
|
||||
|
Loading…
Reference in New Issue
Block a user