From: Varka Bhadram <var...@cdac.in>

This patch replace the kfree(skb) with dev_kfree_skb() which is
used on tx error path. And also use sizeof(*work) instead of
sizeof(struct xmit_work)

Signed-off-by: Varka Bhadram <var...@cdac.in>
---
 net/mac802154/tx.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index 8124353..d05d6ea 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -89,7 +89,7 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct 
sk_buff *skb,
 
        if (!(priv->phy->channels_supported[page] & (1 << chan))) {
                WARN_ON(1);
-               kfree_skb(skb);
+               dev_kfree_skb(skb);
                return NETDEV_TX_OK;
        }
 
@@ -104,13 +104,13 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, 
struct sk_buff *skb,
        }
 
        if (skb_cow_head(skb, priv->hw.extra_tx_headroom)) {
-               kfree_skb(skb);
+               dev_kfree_skb(skb);
                return NETDEV_TX_OK;
        }
 
-       work = kzalloc(sizeof(struct xmit_work), GFP_ATOMIC);
+       work = kzalloc(sizeof(*work), GFP_ATOMIC);
        if (!work) {
-               kfree_skb(skb);
+               dev_kfree_skb(skb);
                return NETDEV_TX_BUSY;
        }
 
@@ -127,6 +127,5 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, 
struct sk_buff *skb,
        work->chan = chan;
 
        queue_work(priv->dev_workqueue, &work->work);
-
        return NETDEV_TX_OK;
 }
-- 
1.7.9.5


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to