mac802154: use goto label on failure
Signed-off-by: Varka Bhadram <varkab@cdac.in>
Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 041dbd5..c0d67b2 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -85,8 +85,7 @@
default:
spin_unlock_bh(&sdata->mib_lock);
pr_debug("invalid dest mode\n");
- kfree_skb(skb);
- return NET_RX_DROP;
+ goto fail;
}
spin_unlock_bh(&sdata->mib_lock);