RDMA/iw_cxgb4: Use kfree_skb instead of kfree
authorHariprasad S <hariprasad@chelsio.com>
Thu, 30 Jun 2016 06:14:33 +0000 (11:44 +0530)
committerDoug Ledford <dledford@redhat.com>
Tue, 2 Aug 2016 17:04:42 +0000 (13:04 -0400)
commit56b2eca3fea8ea4fb6ec732b98470a09385cb1eb
tree992b5feaca30f70ec9efef8f0830955f4a0677dc
parentdd6b0241260d0f16c4051da1c5b09d4da8992ef2
RDMA/iw_cxgb4: Use kfree_skb instead of kfree

The commit 0f8ab0b6e91b4d53 ("RDMA/iw_cxgb4: Low resource fixes for Memory
registration") from Jun 10, 2016, leads to the following static checker
warning:

        drivers/infiniband/hw/cxgb4/mem.c:612 c4iw_alloc_mw()
        error: use kfree_skb() here instead of kfree(mhp->dereg_skb)

Also fixes skb leak in c4iw_dealloc_mw

Fixes: 0f8ab0b6e91b4d53 ("RDMA/iw_cxgb4: Low resource fixes for Memory registration")

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/mem.c