USB: Storage: usbat_check_status(): fix check-after-use
authorAdrian Bunk <bunk@stusta.de>
Mon, 30 Jul 2007 22:28:22 +0000 (00:28 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:54:59 +0000 (14:54 -0700)
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>
drivers/usb/storage/shuttle_usbat.c

index 5e27297c0175cb9017973b5e9e1c82de5c48056a..17ca4d73577b851fdf33eb91dfe2514c97c8ec46 100644 (file)
@@ -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;