diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-10-05 18:09:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-10-17 17:46:33 -0400 |
commit | a65dc301c7448a9a8d24bf1cbfe292541d1fa390 (patch) | |
tree | accd226dcdd84f0422fd7d933fbfbbebb56ea4fd /drivers/usb/misc | |
parent | 0f64478cbc7a008fe7b7e9ae79a73d8a6904ead8 (diff) |
USB: fix dereference in drivers/usb/misc/adutux.c
in two of the error cases, dev is still NULL,
and we dereference it. Spotted by coverity (cid#1428, 1429)
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/adutux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c index aecd633fe9f6..af2934e016a7 100644 --- a/drivers/usb/misc/adutux.c +++ b/drivers/usb/misc/adutux.c | |||
@@ -370,7 +370,8 @@ static int adu_release(struct inode *inode, struct file *file) | |||
370 | retval = adu_release_internal(dev); | 370 | retval = adu_release_internal(dev); |
371 | 371 | ||
372 | exit: | 372 | exit: |
373 | up(&dev->sem); | 373 | if (dev) |
374 | up(&dev->sem); | ||
374 | dbg(2," %s : leave, return value %d", __FUNCTION__, retval); | 375 | dbg(2," %s : leave, return value %d", __FUNCTION__, retval); |
375 | return retval; | 376 | return retval; |
376 | } | 377 | } |