From: Devendra Naga Date: Sat, 21 Jul 2012 07:22:17 +0000 (+0545) Subject: staging/csr: remove firmware pointer check before giving to release_firmware X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=08fb73c1c842d32c15806bd9ae89531d5b0e31ea;p=linux-beck.git staging/csr: remove firmware pointer check before giving to release_firmware we do a check of firmware pointer against the NULL value before we give it to the release_firmware. as release_firmware is actually having a check against NULL, its not needed here. Signed-off-by: Devendra Naga Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/csr/firmware.c b/drivers/staging/csr/firmware.c index d14e11839618..dc6a04db265a 100644 --- a/drivers/staging/csr/firmware.c +++ b/drivers/staging/csr/firmware.c @@ -402,9 +402,7 @@ int uf_release_firmware_files(unifi_priv_t *priv) int uf_release_firmware(unifi_priv_t *priv, struct dlpriv *to_free) { if (to_free != NULL) { - if (to_free->fw_desc != NULL) { - release_firmware((const struct firmware *)to_free->fw_desc); - } + release_firmware((const struct firmware *)to_free->fw_desc); to_free->fw_desc = NULL; to_free->dl_data = NULL; to_free->dl_len = 0;