summaryrefslogtreecommitdiff
path: root/drivers/usb/storage/ene_ub6250.c
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2012-04-10 00:52:04 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-19 00:52:35 +0400
commite44fabbe7fbf8c71cd2e7d28078202e557b4e057 (patch)
treef330c29b20bfae3b5f75d8dfec1af2e1f0a0197f /drivers/usb/storage/ene_ub6250.c
parentc6fa0b4c4e09a13e034a1c6c542dc2b3539ba1b8 (diff)
downloadlinux-e44fabbe7fbf8c71cd2e7d28078202e557b4e057.tar.xz
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 <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage/ene_ub6250.c')
-rw-r--r--drivers/usb/storage/ene_ub6250.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c
index e7e678109500..b28f2ad127d4 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;
}