Commit a65dc301 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Greg Kroah-Hartman

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: default avatarEric Sesterhenn <snakebyte@gmx.de>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0f64478c
......@@ -370,6 +370,7 @@ static int adu_release(struct inode *inode, struct file *file)
retval = adu_release_internal(dev);
exit:
if (dev)
up(&dev->sem);
dbg(2," %s : leave, return value %d", __FUNCTION__, retval);
return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment