Skip to content

Commit

Permalink
wireless, orinoco: release_firmware() tests for NULL, remove explicit…
Browse files Browse the repository at this point in the history
… tests before calls

It is redundant to test for NULL pointers before calling
release_firmware() since the function does its own NULL test.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Jesper Juhl authored and John W. Linville committed Apr 12, 2012
1 parent 4fb25c5 commit f512311
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/wireless/orinoco/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,8 @@ void orinoco_cache_fw(struct orinoco_private *priv, int ap)

void orinoco_uncache_fw(struct orinoco_private *priv)
{
if (priv->cached_pri_fw)
release_firmware(priv->cached_pri_fw);
if (priv->cached_fw)
release_firmware(priv->cached_fw);

release_firmware(priv->cached_pri_fw);
release_firmware(priv->cached_fw);
priv->cached_pri_fw = NULL;
priv->cached_fw = NULL;
}
Expand Down

0 comments on commit f512311

Please sign in to comment.