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>
This commit is contained in:
parent
0f64478cbc
commit
a65dc301c7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue