diff options
Diffstat (limited to 'drivers/usb/misc/adutux.c')
-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 | } |