]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mwifiex: remove an unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 8 Nov 2011 03:31:45 +0000 (19:31 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 Nov 2011 21:14:12 +0000 (16:14 -0500)
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>
drivers/net/wireless/mwifiex/pcie.c

index 44669763c4e6aa2021cdfd1ceadfa2aa4f65f88c..d12d440554892fbb56a1cdb34a7beee489755093 100644 (file)
@@ -1671,9 +1671,8 @@ static int mwifiex_pcie_host_to_card(struct mwifiex_adapter *adapter, u8 type,
                                     struct sk_buff *skb,
                                     struct mwifiex_tx_param *tx_param)
 {
-       if (!adapter || !skb) {
-               dev_err(adapter->dev, "Invalid parameter in %s <%p, %p>\n",
-                               __func__, adapter, skb);
+       if (!skb) {
+               dev_err(adapter->dev, "Passed NULL skb to %s\n", __func__);
                return -1;
        }