From bc3d6a34c0b2e1ccdc1520ba814622cf0e1f58d6 Mon Sep 17 00:00:00 2001 From: Timothy McDaniel Date: Wed, 11 Nov 2020 14:27:01 -0600 Subject: [PATCH] event/dlb: skip memzone freeing if port created Add missing returns so that the memzone free is not called if port create is successful. Signed-off-by: Timothy McDaniel Reviewed-by: Mike Ximing Chen --- drivers/event/dlb/pf/dlb_pf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/event/dlb/pf/dlb_pf.c b/drivers/event/dlb/pf/dlb_pf.c index cf88c49684..3aeef6f91d 100644 --- a/drivers/event/dlb/pf/dlb_pf.c +++ b/drivers/event/dlb/pf/dlb_pf.c @@ -342,6 +342,7 @@ dlb_pf_ldb_port_create(struct dlb_hw_dev *handle, *(struct dlb_cmd_response *)cfg->response = response; DLB_INFO(dev->dlb_device, "Exiting %s() with ret=%d\n", __func__, ret); + return 0; create_port_err: @@ -419,6 +420,7 @@ dlb_pf_dir_port_create(struct dlb_hw_dev *handle, *(struct dlb_cmd_response *)cfg->response = response; DLB_INFO(dev->dlb_device, "Exiting %s() with ret=%d\n", __func__, ret); + return 0; create_port_err: -- 2.20.1