lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 31 Jul 2007 00:28:22 +0200
From:	Adrian Bunk <bunk@...sta.de>
To:	mdharm-usb@...-eyed-alien.net, gregkh@...e.de
Cc:	linux-usb-devel@...ts.sourceforge.net,
	usb-storage@...ts.one-eyed-alien.net, linux-kernel@...r.kernel.org
Subject: [2.6 patch] 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@...sta.de>

---
--- linux-2.6.23-rc1-mm1/drivers/usb/storage/shuttle_usbat.c.old	2007-07-30 16:56:34.000000000 +0200
+++ linux-2.6.23-rc1-mm1/drivers/usb/storage/shuttle_usbat.c	2007-07-30 16:57:24.000000000 +0200
@@ -190,9 +190,6 @@ static int usbat_check_status(struct 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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ