[PATCH 3/3] staging/csr: remove firmware pointer check before giving to release_firmware

From: Devendra Naga
Date: Sat Jul 21 2012 - 03:22:18 EST


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 <develkernel412222@xxxxxxxxx>
---
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 d14e118..dc6a04d 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;
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/