[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250820131722.502768-1-liaoyuanhong@vivo.com>
Date: Wed, 20 Aug 2025 21:17:22 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: Ajay Gupta <ajayg@...dia.com>,
Andi Shyti <andi.shyti@...nel.org>,
linux-i2c@...r.kernel.org (open list:I2C CONTROLLER DRIVER FOR NVIDIA GPU),
linux-kernel@...r.kernel.org (open list)
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH] i2c: nvidia-gpu: remove the use of dev_err_probe()
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@...o.com>
---
drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index 541d808d62d0..056ed33818af 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -291,7 +291,7 @@ static int gpu_i2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
i2cd->regs = pcim_iomap(pdev, 0, 0);
if (!i2cd->regs)
- return dev_err_probe(dev, -ENOMEM, "pcim_iomap failed\n");
+ return -ENOMEM;
status = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
if (status < 0)
--
2.34.1
Powered by blists - more mailing lists