提交 f5123117 编写于 作者: J Jesper Juhl 提交者: John W. Linville

wireless, orinoco: release_firmware() tests for NULL, remove explicit 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: NJesper Juhl <jj@chaosbits.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 4fb25c59
...@@ -379,11 +379,8 @@ void orinoco_cache_fw(struct orinoco_private *priv, int ap) ...@@ -379,11 +379,8 @@ void orinoco_cache_fw(struct orinoco_private *priv, int ap)
void orinoco_uncache_fw(struct orinoco_private *priv) void orinoco_uncache_fw(struct orinoco_private *priv)
{ {
if (priv->cached_pri_fw) release_firmware(priv->cached_pri_fw);
release_firmware(priv->cached_pri_fw); release_firmware(priv->cached_fw);
if (priv->cached_fw)
release_firmware(priv->cached_fw);
priv->cached_pri_fw = NULL; priv->cached_pri_fw = NULL;
priv->cached_fw = NULL; priv->cached_fw = NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册