From d34491679d7c583a1d3bddfc1d8a7b2f72dd2ad7 Mon Sep 17 00:00:00 2001 From: Amitoj Kaur Chawla Date: Mon, 22 Feb 2016 22:13:39 +0530 Subject: [PATCH] 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: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rdma/hfi1/init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rdma/hfi1/init.c b/drivers/staging/rdma/hfi1/init.c index 4dd8051aba7e..310710321790 100644 --- a/drivers/staging/rdma/hfi1/init.c +++ b/drivers/staging/rdma/hfi1/init.c @@ -332,7 +332,6 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt) } return rcd; bail: - kfree(rcd->opstats); kfree(rcd->egrbufs.rcvtids); kfree(rcd->egrbufs.buffers); kfree(rcd); -- 2.39.5