Skip to content

Commit

Permalink
staging/csr: remove firmware pointer check before giving to release_f…
Browse files Browse the repository at this point in the history
…irmware

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Devendra Naga authored and Greg Kroah-Hartman committed Aug 14, 2012
1 parent 2dd58c9 commit 08fb73c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/csr/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 08fb73c

Please sign in to comment.