diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-11-07 22:31:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-09 16:14:12 -0500 |
commit | fa161cb7aa7da29018f7378ccbab6bb593be008c (patch) | |
tree | 158bff5e6397ace8b83259dc433a00f631371f8d /drivers/net/wireless | |
parent | fba6fe634787bb7ef95fb44682df71b4d4e8cb2d (diff) |
mwifiex: remove an unneeded NULL check
We dereference adapter in the error handling code so this needed to
be fixed. This function is always called like:
adapter->if_ops.host_to_card(adapter, ...);
so adapter can never be NULL and I've removed the NULL check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mwifiex/pcie.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index 44669763c4e6..d12d44055489 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c | |||
@@ -1671,9 +1671,8 @@ static int mwifiex_pcie_host_to_card(struct mwifiex_adapter *adapter, u8 type, | |||
1671 | struct sk_buff *skb, | 1671 | struct sk_buff *skb, |
1672 | struct mwifiex_tx_param *tx_param) | 1672 | struct mwifiex_tx_param *tx_param) |
1673 | { | 1673 | { |
1674 | if (!adapter || !skb) { | 1674 | if (!skb) { |
1675 | dev_err(adapter->dev, "Invalid parameter in %s <%p, %p>\n", | 1675 | dev_err(adapter->dev, "Passed NULL skb to %s\n", __func__); |
1676 | __func__, adapter, skb); | ||
1677 | return -1; | 1676 | return -1; |
1678 | } | 1677 | } |
1679 | 1678 | ||