linux/drivers/usb/misc
Julien Brunel bedf0883cb USB: drivers/usb/misc: Use an IS_ERR test rather than a NULL test
In case of error, the function backlight_device_register returns an
ERR pointer, but never returns a NULL pointer. So a NULL test that may
come after a call to this function should be strengthened by an IS_ERR
test.

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

// <smpl>
@match_bad_null_test@
expression x, E;
statement S1,S2;
@@
x = backlight_device_register(...)
... when != x = E
* if (x != NULL) 
S1 else S2
// </smpl>

Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17 14:40:53 -07:00
..
sisusbvga
adutux.c
appledisplay.c USB: drivers/usb/misc: Use an IS_ERR test rather than a NULL test 2008-10-17 14:40:53 -07:00
berry_charge.c
cypress_cy7c63.c
cytherm.c
emi26.c
emi62.c
ftdi-elan.c
idmouse.c
iowarrior.c
isight_firmware.c
Kconfig USB: Added driver for a Delcom USB 7-segment LED Display 2008-10-17 14:40:51 -07:00
ldusb.c
legousbtower.c
Makefile USB: Added driver for a Delcom USB 7-segment LED Display 2008-10-17 14:40:51 -07:00
phidget.c
phidget.h
phidgetkit.c device create: usb: convert device_create_drvdata to device_create 2008-10-16 09:24:45 -07:00
phidgetmotorcontrol.c device create: usb: convert device_create_drvdata to device_create 2008-10-16 09:24:45 -07:00
phidgetservo.c device create: usb: convert device_create_drvdata to device_create 2008-10-16 09:24:45 -07:00
rio500_usb.h
rio500.c
trancevibrator.c
usb_u132.h
usblcd.c
usbled.c
usbsevseg.c USB: Added driver for a Delcom USB 7-segment LED Display 2008-10-17 14:40:51 -07:00
usbtest.c
uss720.c