aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/shuttle_usbat.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2007-07-30 18:28:22 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:54:59 -0400
commita96173af521a173f45d3a27fa24265081f12e978 (patch)
treea3198b3407b09e041aa0b8f7383b18225799cf2e /drivers/usb/storage/shuttle_usbat.c
parentefc9052e01fd316b7bd6b108feff7689c927ebe9 (diff)
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>
Diffstat (limited to 'drivers/usb/storage/shuttle_usbat.c')
-rw-r--r--drivers/usb/storage/shuttle_usbat.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c
index 5e27297c0175..17ca4d73577b 100644
--- a/drivers/usb/storage/shuttle_usbat.c
+++ b/drivers/usb/storage/shuttle_usbat.c
@@ -190,9 +190,6 @@ static int usbat_check_status(struct us_data *us)
190 unsigned char *reply = us->iobuf; 190 unsigned char *reply = us->iobuf;
191 int rc; 191 int rc;
192 192
193 if (!us)
194 return USB_STOR_TRANSPORT_ERROR;
195
196 rc = usbat_get_status(us, reply); 193 rc = usbat_get_status(us, reply);
197 if (rc != USB_STOR_XFER_GOOD) 194 if (rc != USB_STOR_XFER_GOOD)
198 return USB_STOR_TRANSPORT_FAILED; 195 return USB_STOR_TRANSPORT_FAILED;