* [PATCH] bus: imx-aipstz: Remove the use of dev_err_probe()
@ 2025-08-20 12:35 Liao Yuanhong
0 siblings, 0 replies; only message in thread
From: Liao Yuanhong @ 2025-08-20 12:35 UTC (permalink / raw)
To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Laurentiu Mihalcea, Daniel Baluta,
open list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
open list
Cc: Liao Yuanhong
Logging messages that show some type of "out of memory" error are generally
unnecessary as there is a generic message and a stack dump done by the
memory subsystem. These messages generally increase kernel size without
much added value[1].
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.
[1]: https://lore.kernel.org/lkml/1402419340.30479.18.camel@joe-AO725/
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
drivers/bus/imx-aipstz.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/imx-aipstz.c b/drivers/bus/imx-aipstz.c
index 5fdf377f5d06..b0f1445c4110 100644
--- a/drivers/bus/imx-aipstz.c
+++ b/drivers/bus/imx-aipstz.c
@@ -37,13 +37,11 @@ static int imx_aipstz_probe(struct platform_device *pdev)
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
if (!data)
- return dev_err_probe(&pdev->dev, -ENOMEM,
- "failed to allocate data memory\n");
+ return -ENOMEM;
data->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(data->base))
- return dev_err_probe(&pdev->dev, -ENOMEM,
- "failed to get/ioremap AC memory\n");
+ return -ENOMEM;
data->default_cfg = of_device_get_match_data(&pdev->dev);
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-08-20 12:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 12:35 [PATCH] bus: imx-aipstz: Remove the use of dev_err_probe() Liao Yuanhong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).