diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-10-06 00:09:29 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-10-17 14:46:33 -0700 |
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 aecd633fe9f..af2934e016a 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) retval = adu_release_internal(dev); exit: - up(&dev->sem); + if (dev) + up(&dev->sem); dbg(2," %s : leave, return value %d", __FUNCTION__, retval); return retval; } |