summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-amd-pci.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-08-19 18:45:38 +0100
committerMark Brown <broonie@kernel.org>2025-08-19 18:45:38 +0100
commitb875b97017050b92c64273178a0b0d282ea67874 (patch)
treea7d1f21a2b2a932dba678a40200b0510e4ecdb77 /drivers/spi/spi-amd-pci.c
parentc1dd310f1d76b4b13f1854618087af2513140897 (diff)
parent27848c082ba0b22850fd9fb7b185c015423dcdc7 (diff)
spi: Remove the use of dev_err_probe()
Merge series from Xichao Zhao <zhao.xichao@vivo.com>: 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.
Diffstat (limited to 'drivers/spi/spi-amd-pci.c')
-rw-r--r--drivers/spi/spi-amd-pci.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/spi-amd-pci.c b/drivers/spi/spi-amd-pci.c
index e5faab414c17..d48c3a5da303 100644
--- a/drivers/spi/spi-amd-pci.c
+++ b/drivers/spi/spi-amd-pci.c
@@ -38,7 +38,7 @@ static int amd_spi_pci_probe(struct pci_dev *pdev,
/* Allocate storage for host and driver private data */
host = devm_spi_alloc_host(dev, sizeof(struct amd_spi));
if (!host)
- return dev_err_probe(dev, -ENOMEM, "Error allocating SPI host\n");
+ return -ENOMEM;
amd_spi = spi_controller_get_devdata(host);
@@ -47,8 +47,7 @@ static int amd_spi_pci_probe(struct pci_dev *pdev,
amd_spi->io_remap_addr = devm_ioremap(dev, io_base_addr, AMD_HID2_MEM_SIZE);
if (!amd_spi->io_remap_addr)
- return dev_err_probe(dev, -ENOMEM,
- "ioremap of SPI registers failed\n");
+ return -ENOMEM;
dev_dbg(dev, "io_remap_address: %p\n", amd_spi->io_remap_addr);