提交 d3449167 编写于 作者: A Amitoj Kaur Chawla 提交者: Greg Kroah-Hartman

staging: rdma: hfi1: Remove unnecessary kfree

Remove an unnecessary kfree since rcd->opstats's value must be NULL
for the code to execute `bail` label.

This fixes the following smatch warning:
drivers/staging/rdma/hfi1/init.c:335 hfi1_create_ctxtdata() warn:
calling kfree() when 'rcd->opstats' is always NULL.
Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e1af35bc
...@@ -332,7 +332,6 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt) ...@@ -332,7 +332,6 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt)
} }
return rcd; return rcd;
bail: bail:
kfree(rcd->opstats);
kfree(rcd->egrbufs.rcvtids); kfree(rcd->egrbufs.rcvtids);
kfree(rcd->egrbufs.buffers); kfree(rcd->egrbufs.buffers);
kfree(rcd); kfree(rcd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册