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-prev] [day] [month] [year] [list]
Date:	Mon, 30 Jul 2007 17:13:47 -0700
From:	Matthew Dharm <mdharm-kernel@...-eyed-alien.net>
To:	Adrian Bunk <bunk@...sta.de>
Cc:	gregkh@...e.de, linux-usb-devel@...ts.sourceforge.net,
	usb-storage@...ts.one-eyed-alien.net, linux-kernel@...r.kernel.org
Subject: Re: [2.6 patch] usbat_check_status(): fix check-after-use

Signed-off-by: Matthew Dharm <mdharm-usb@...-eyed-alien.net>

On Tue, Jul 31, 2007 at 12:28:22AM +0200, Adrian Bunk wrote:
> 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;

-- 
Matthew Dharm                              Home: mdharm-usb@...-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

I need a computer?
					-- Customer
User Friendly, 2/19/1998

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists