The parameter of kfree function is NULL, so kfree code is useless, delete it. Signed-off-by: Zheng Yongjun <zhengyongjun3@xxxxxxxxxx> --- drivers/infiniband/core/cma_configfs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/infiniband/core/cma_configfs.c b/drivers/infiniband/core/cma_configfs.c index 7ec4af2ed87a..c6e7cd9bc25a 100644 --- a/drivers/infiniband/core/cma_configfs.c +++ b/drivers/infiniband/core/cma_configfs.c @@ -235,7 +235,6 @@ static int make_cma_ports(struct cma_dev_group *cma_dev_group, return 0; free: - kfree(ports); cma_dev_group->ports = NULL; return err; } -- 2.22.0