Re: [2.6 patch] usbat_check_status(): fix check-after-use
Matthew Dharm <[email protected]>
| Newsgroups | gmane.linux.usb.devel,gmane.linux.kernel |
|---|---|
| Organization | One Eyed Alien Networks |
| Message-ID | <[email protected]> |
Signed-off-by: Matthew Dharm <[email protected]> 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 <[email protected]> > > --- > --- 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: [email protected] Maintainer, Linux USB Mass Storage Driver I need a computer? -- Customer User Friendly, 2/19/1998 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGrn67HL9iwnUZqnkRAojgAJ9xwu8BP0jXMS5ZyVudabQyAgUo8QCgkOf8 HBMMiufkYFVBRICGchYVu7U= =Eb7Z -----END PGP SIGNATURE-----