[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250819121023.608298-1-zhao.xichao@vivo.com>
Date: Tue, 19 Aug 2025 20:10:23 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: nm@...com,
ssantosh@...nel.org
Cc: linux-kernel@...r.kernel.org,
Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH] soc: ti: Remove the use of dev_err_probe()
The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.
Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
---
drivers/soc/ti/pm33xx.c | 7 ++-----
drivers/soc/ti/pruss.c | 5 ++---
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
index dc52a2197d24..24f8df1c8ebd 100644
--- a/drivers/soc/ti/pm33xx.c
+++ b/drivers/soc/ti/pm33xx.c
@@ -408,16 +408,13 @@ static int am33xx_pm_alloc_sram(void)
ocmcram_location = gen_pool_alloc(sram_pool, *pm_sram->do_wfi_sz);
if (!ocmcram_location)
- return dev_err_probe(pm33xx_dev, -ENOMEM,
- "PM: %s: Unable to allocate memory from ocmcram\n",
- __func__);
+ return -ENOMEM;
ocmcram_location_data = gen_pool_alloc(sram_pool_data,
sizeof(struct emif_regs_amx3));
if (!ocmcram_location_data) {
gen_pool_free(sram_pool, ocmcram_location, *pm_sram->do_wfi_sz);
- return dev_err_probe(pm33xx_dev, -ENOMEM,
- "PM: Unable to allocate memory from ocmcram\n");
+ return -ENOMEM;
}
return 0;
diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c
index d7634bf5413a..8bd1dbc84fcb 100644
--- a/drivers/soc/ti/pruss.c
+++ b/drivers/soc/ti/pruss.c
@@ -443,9 +443,8 @@ static int pruss_of_setup_memories(struct device *dev, struct pruss *pruss)
pruss->mem_regions[i].va = devm_ioremap(dev, res.start,
resource_size(&res));
if (!pruss->mem_regions[i].va)
- return dev_err_probe(dev, -ENOMEM,
- "failed to parse and map memory resource %d %s\n",
- i, mem_names[i]);
+ return -ENOMEM;
+
pruss->mem_regions[i].pa = res.start;
pruss->mem_regions[i].size = resource_size(&res);
--
2.34.1
Powered by blists - more mailing lists