From: Adrian Bunk Date: Mon, 30 Jul 2007 22:28:22 +0000 (+0200) Subject: USB: Storage: usbat_check_status(): fix check-after-use X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a96173af521a173f45d3a27fa24265081f12e978;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman --- 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) 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;