From 08fb73c1c842d32c15806bd9ae89531d5b0e31ea Mon Sep 17 00:00:00 2001 From: Devendra Naga Date: Sat, 21 Jul 2012 13:07:17 +0545 Subject: [PATCH] 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 --- drivers/staging/csr/firmware.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; -- 2.20.1