summaryrefslogtreecommitdiff
path: root/drivers/usb/storage/jumpshot.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-07-19 19:29:57 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 17:46:29 +0400
commit64aebe73152ab3a9f5f426baaf65db632bd72c13 (patch)
treeb96e307aed23b98bd83c1096da8619e0d042849d /drivers/usb/storage/jumpshot.c
parent981e60f037631ca725a9790e7b3512de4a60bba8 (diff)
downloadlinux-64aebe73152ab3a9f5f426baaf65db632bd72c13.tar.xz
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>
Diffstat (limited to 'drivers/usb/storage/jumpshot.c')
-rw-r--r--drivers/usb/storage/jumpshot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c
index 1c69420e3acf..6168596c5ac6 100644
--- a/drivers/usb/storage/jumpshot.c
+++ b/drivers/usb/storage/jumpshot.c
@@ -335,7 +335,7 @@ static int jumpshot_id_device(struct us_data *us,
unsigned char *reply;
int rc;
- if (!us || !info)
+ if (!info)
return USB_STOR_TRANSPORT_ERROR;
command[0] = 0xE0;