Commit 43163f0f authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville

ath9k: cleanup: remove unneeded null check

We dereference "wmi" on the line before and also when we initialize "ah".
This check has always been after a dereference since the first commit a
couple months ago.  Looking through the code, it looks like "wmi" can't
actually be null here so I just removed the check.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarSujith <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a906b060
...@@ -279,9 +279,6 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id, ...@@ -279,9 +279,6 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
if (wmi->drv_priv->op_flags & OP_UNPLUGGED) if (wmi->drv_priv->op_flags & OP_UNPLUGGED)
return 0; return 0;
if (!wmi)
return -EINVAL;
skb = alloc_skb(headroom + cmd_len, GFP_ATOMIC); skb = alloc_skb(headroom + cmd_len, GFP_ATOMIC);
if (!skb) if (!skb)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment