ieee802154: free skb buffer if dev isn't running
authorAlexander Smirnov <alex.bluesman.smirnov@gmail.com>
Wed, 29 Jun 2011 12:51:37 +0000 (12:51 +0000)
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Thu, 30 Jun 2011 12:18:09 +0000 (16:18 +0400)
Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
net/ieee802154/af_ieee802154.c

index 6df6ecf4970876b54ef16acac3a971fdaf1d333c..40e606f3788f11f5dcdeb59420ff18a4ec24eab1 100644 (file)
@@ -302,7 +302,7 @@ static int ieee802154_rcv(struct sk_buff *skb, struct net_device *dev,
        struct packet_type *pt, struct net_device *orig_dev)
 {
        if (!netif_running(dev))
-               return -ENODEV;
+               goto drop;
        pr_debug("got frame, type %d, dev %p\n", dev->type, dev);
 #ifdef DEBUG
        print_hex_dump_bytes("ieee802154_rcv ", DUMP_PREFIX_NONE, skb->data, skb->len);