From e44fabbe7fbf8c71cd2e7d28078202e557b4e057 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 9 Apr 2012 22:52:04 +0200 Subject: usb/storage/ene_ub6250: Remove redundant NULL check before release_firmware() and pointless assignment release_firmware() tests for a NULL pointer, so it's redundant to do that checking before calling it. Additionally, in ene_load_bincode(), 'sd_fw' is a local variable so setting it to NULL just before it goes out of scope is completely pointless, so remove that assignment. Signed-off-by: Jesper Juhl Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/ene_ub6250.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers/usb/storage') diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c index e7e67810950..b28f2ad127d 100644 --- a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c @@ -1933,11 +1933,7 @@ static int ene_load_bincode(struct us_data *us, unsigned char flag) kfree(buf); nofw: - if (sd_fw != NULL) { - release_firmware(sd_fw); - sd_fw = NULL; - } - + release_firmware(sd_fw); return result; } -- cgit v1.2.3-70-g09d2