diff options
Diffstat (limited to 'drivers/usb/core/devices.c')
-rw-r--r-- | drivers/usb/core/devices.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c index b87608b7051b..ef0b35731ff0 100644 --- a/drivers/usb/core/devices.c +++ b/drivers/usb/core/devices.c | |||
@@ -637,11 +637,8 @@ static int usb_device_open(struct inode *inode, struct file *file) | |||
637 | 637 | ||
638 | static int usb_device_release(struct inode *inode, struct file *file) | 638 | static int usb_device_release(struct inode *inode, struct file *file) |
639 | { | 639 | { |
640 | if (file->private_data) { | 640 | kfree(file->private_data); |
641 | kfree(file->private_data); | 641 | file->private_data = NULL; |
642 | file->private_data = NULL; | ||
643 | } | ||
644 | |||
645 | return 0; | 642 | return 0; |
646 | } | 643 | } |
647 | 644 | ||