2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 01:34:00 +08:00

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>
This commit is contained in:
Jesper Juhl 2012-04-09 22:52:04 +02:00 committed by Greg Kroah-Hartman
parent c6fa0b4c4e
commit e44fabbe7f

View File

@ -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;
}