staging: wilc1000: linux_mon.c: add to check routine
authorLeo Kim <leo.kim@atmel.com>
Mon, 22 Feb 2016 04:11:49 +0000 (13:11 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Feb 2016 19:47:00 +0000 (11:47 -0800)
This patch adds the return value which needs the check and
prints the error message when it fails.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_mon.c

index 2b575d14ed5dbe0bcf21a496f457b41726342c04..dd9e4b2270218738b8ab1377ed82e29dd4618e47 100644 (file)
@@ -266,7 +266,9 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
        /* if source address and bssid fields are equal>>Mac header */
        /*send it to mgmt frames handler */
        if (!(memcmp(srcAdd, bssid, 6))) {
-               mon_mgmt_tx(mon_priv->real_ndev, skb->data, skb->len);
+               ret = mon_mgmt_tx(mon_priv->real_ndev, skb->data, skb->len);
+               if (ret)
+                       netdev_err(dev, "fail to mgmt tx\n");
                dev_kfree_skb(skb);
        } else {
                ret = wilc_mac_xmit(skb, mon_priv->real_ndev);