提交 a96173af 编写于 作者: A Adrian Bunk 提交者: Greg Kroah-Hartman

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: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NMatthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 efc9052e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册