* [PATCH 3/3] staging/csr: remove firmware pointer check before giving to release_firmware
@ 2012-07-21 7:22 Devendra Naga
0 siblings, 0 replies; only message in thread
From: Devendra Naga @ 2012-07-21 7:22 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, linux-kernel
Cc: Mikko Virkkilä, Lauri Hintsala, Riku Mettälä,
Veli-Pekka Peltola, Devendra Naga
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-21 7:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-21 7:22 [PATCH 3/3] staging/csr: remove firmware pointer check before giving to release_firmware Devendra Naga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox