]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmotm: cxgb4-drop-__gfp_nofail-allocation-fix
authorMichal Hocko <mhocko@suse.cz>
Tue, 7 Apr 2015 23:43:50 +0000 (09:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:43:50 +0000 (09:43 +1000)
Use kfree_skb instead of kfree because the allocation is done by
alloc_skb.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Hariprasad S <hariprasad@chelsio.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

index 9b8cd0f30222a241e543a098a4a7b5fc545508ff..f4b76bd53383833ee633d26f48016f5e9cfc80d8 100644 (file)
@@ -1161,14 +1161,14 @@ static int set_filter_wr(struct adapter *adapter, int fidx)
                /* allocate L2T entry for new filter */
                f->l2t = t4_l2t_alloc_switching(adapter->l2t);
                if (f->l2t == NULL) {
-                       kfree(skb);
+                       kfree_skb(skb);
                        return -EAGAIN;
                }
                if (t4_l2t_set_switching(adapter, f->l2t, f->fs.vlan,
                                        f->fs.eport, f->fs.dmac)) {
                        cxgb4_l2t_release(f->l2t);
                        f->l2t = NULL;
-                       kfree(skb);
+                       kfree_skb(skb);
                        return -ENOMEM;
                }
        }