1
linux/drivers/usb/storage
Julia Lawall 64aebe7315 USB: storage: Drop an unneeded a NULL test
In each case, the NULL test is not necessary because the function is static
and at the only places where it is called, the us argument has already been
dereferenced.

The semantic patch that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E,E1;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E=E1
      when != i
  if (E == NULL||...) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-23 06:46:29 -07:00
..
alauda.c USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* modules 2009-03-24 16:20:35 -07:00
cypress_atacb.c USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* modules 2009-03-24 16:20:35 -07:00
datafab.c USB: storage: Drop an unneeded a NULL test 2009-09-23 06:46:29 -07:00
debug.c
debug.h
freecom.c USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* modules 2009-03-24 16:20:35 -07:00
initializers.c USB: janitor storage initializers 2009-06-15 21:44:44 -07:00
initializers.h
isd200.c isd200: use ATA_* defines instead of *_STAT and *_ERR ones 2009-04-01 21:42:25 +02:00
jumpshot.c USB: storage: Drop an unneeded a NULL test 2009-09-23 06:46:29 -07:00
karma.c USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* modules 2009-03-24 16:20:35 -07:00
Kconfig usb-storage: make onetouch a separate module 2009-03-24 16:20:35 -07:00
libusual.c
Makefile usb-storage: fix mistake in Makefile 2009-04-17 10:50:26 -07:00
onetouch.c USB: storage: fix a resume path GFP_NOIO must be used 2009-09-23 06:46:15 -07:00
option_ms.c USB: Fix option_ms regression in 2.6.31-rc2 2009-07-12 15:16:40 -07:00
option_ms.h
protocol.c
protocol.h
scsiglue.c block: Use accessor functions for queue limits 2009-05-22 23:22:54 +02:00
scsiglue.h
sddr09.c USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* modules 2009-03-24 16:20:35 -07:00
sddr55.c USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* modules 2009-03-24 16:20:35 -07:00
shuttle_usbat.c USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* modules 2009-03-24 16:20:35 -07:00
sierra_ms.c USB: usb-storage: fix return values from init functions 2009-06-15 21:44:46 -07:00
sierra_ms.h
transport.c USB: storage: raise timeout in usb_stor_Bulk_max_lun 2009-07-28 14:31:09 -07:00
transport.h
unusual_alauda.h
unusual_cypress.h
unusual_datafab.h
unusual_devs.h USB: storage: include Prolific Technology USB drive in unusual_devs list 2009-08-07 16:05:14 -07:00
unusual_freecom.h
unusual_isd200.h
unusual_jumpshot.h
unusual_karma.h
unusual_onetouch.h usb-storage: make onetouch a separate module 2009-03-24 16:20:35 -07:00
unusual_sddr09.h
unusual_sddr55.h
unusual_usbat.h
usb.c usb-storage: make onetouch a separate module 2009-03-24 16:20:35 -07:00
usb.h
usual-tables.c usb-storage: make onetouch a separate module 2009-03-24 16:20:35 -07:00