From ce130e224fa650261ad01405bcfe9b312abd510b Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Wed, 19 May 2021 16:24:39 -0700 Subject: [PATCH] t23x: hwpm: fix issue in tegra_soc_hwpm_open For successful tegra_soc_hwpm_open, return success without falling through failure case. Added debug info in tegra_soc_hwpm_open function to indicate failure case. Bug 200702306 Change-Id: Ib107d9a89c185d913dc88843e750f36765790bbf Signed-off-by: Seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/c/linux-t23x/+/2532084 Tested-by: Vedashree Vidwans Tested-by: mobile promotions Reviewed-by: svcacv Reviewed-by: Vedashree Vidwans Reviewed-by: Adeel Raza Reviewed-by: mobile promotions --- tegra-soc-hwpm-ioctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tegra-soc-hwpm-ioctl.c b/tegra-soc-hwpm-ioctl.c index 6cdf103..614573e 100644 --- a/tegra-soc-hwpm-ioctl.c +++ b/tegra-soc-hwpm-ioctl.c @@ -1315,6 +1315,8 @@ static int tegra_soc_hwpm_open(struct inode *inode, struct file *filp) hwpm->bind_completed = false; hwpm->full_wlist_size = -1; + return 0; + fail: if (hwpm->dt_apertures[TEGRA_SOC_HWPM_PMA_DT]) { iounmap(hwpm->dt_apertures[TEGRA_SOC_HWPM_PMA_DT]); @@ -1341,6 +1343,7 @@ fail: kfree(cmd_slice_rtr_map[1].fake_registers); cmd_slice_rtr_map[1].fake_registers = NULL; } + tegra_soc_hwpm_err("%s failed", __func__); return ret; }