mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Cc: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
0f64478cbc
commit
a65dc301c7
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue