linux/drivers/usb/host/whci
Julia Lawall dc6eb27bdd USB: host: Eliminate NULL dereference
The test above allows std to be NULL, so check that std is not NULL before
doing the dereference.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E,E1;
identifier f;
statement S1,S2,S3;
@@

if ((E == NULL && ...) || ...)
{
  ... when != if (...) S1 else S2
      when != E = E1
* E->f
  ... when any
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-10 14:35:34 -07:00
..
Kbuild wusb: add debug files for ASL, PZL and DI to the whci-hcd driver 2008-11-26 13:36:59 +00:00
asl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
debug.c USB: whci: declare functions as static 2010-05-20 13:21:41 -07:00
hcd.c USB: whci-hcd: support urbs with scatter-gather lists 2009-12-11 11:55:14 -08:00
hw.c wusb: timeout when waiting for ASL/PZL updates in whci-hcd 2009-01-07 10:54:22 +00:00
init.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
int.c wusb: remove unused #include <version.h> 2008-10-31 15:10:27 +00:00
pzl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
qset.c USB: host: Eliminate NULL dereference 2010-08-10 14:35:34 -07:00
whcd.h USB: whci-hcd: support urbs with scatter-gather lists 2009-12-11 11:55:14 -08:00
whci-hc.h USB: wusb: add wusb_phy_rate sysfs file to host controllers 2009-12-11 11:55:16 -08:00
wusb.c wusb: add debug files for ASL, PZL and DI to the whci-hcd driver 2008-11-26 13:36:59 +00:00