Skip to content

Commit

Permalink
USB: Storage: usbat_check_status(): fix check-after-use
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent efc9052 commit a96173a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/usb/storage/shuttle_usbat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a96173a

Please sign in to comment.