Skip to content

Commit

Permalink
usb/storage/ene_ub6250: Remove redundant NULL check before release_fi…
Browse files Browse the repository at this point in the history
…rmware() 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>
  • Loading branch information
Jesper Juhl authored and Greg Kroah-Hartman committed Apr 18, 2012
1 parent c6fa0b4 commit e44fabb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/usb/storage/ene_ub6250.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e44fabb

Please sign in to comment.