From 1bc3c9e1e44c2059fe2ffa6ff70ad0a925d7b05f Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 18 Apr 2005 17:39:34 -0700 Subject: [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL Get rid of a bunch of redundant NULL pointer checks in drivers/usb/*, there's no need to check a pointer for NULL before calling kfree() on it. Signed-off-by: Jesper Juhl Signed-off-by: Greg Kroah-Hartman Index: gregkh-2.6/drivers/usb/class/audio.c =================================================================== --- drivers/usb/core/devices.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'drivers/usb/core/devices.c') 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) static int usb_device_release(struct inode *inode, struct file *file) { - if (file->private_data) { - kfree(file->private_data); - file->private_data = NULL; - } - + kfree(file->private_data); + file->private_data = NULL; return 0; } -- cgit v1.2.3