summaryrefslogtreecommitdiff
path: root/drivers/mfd/tps6594-spi.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-05-25 12:03:45 +0300
committerLee Jones <lee@kernel.org>2023-06-15 11:19:38 +0300
commitcc5f2eb7ce1190c163d309146fe236e2fa2e6c68 (patch)
treee466e4e365cf0dd2db57f86b6c9a686beefe3c58 /drivers/mfd/tps6594-spi.c
parent4b506480f6d9d3f0d2a170aec048530a3ba4ffa4 (diff)
downloadlinux-cc5f2eb7ce1190c163d309146fe236e2fa2e6c68.tar.xz
mfd: tps6594: Fix an error code in probe()
These error paths accidentally return success when they should return -EINVAL. Fixes: 325bec7157b3 ("mfd: tps6594: Add driver for TI TPS6594 PMIC") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/49f7cd8f-f7eb-40f1-91e8-291620c684df@kili.mountain Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/tps6594-spi.c')
-rw-r--r--drivers/mfd/tps6594-spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/tps6594-spi.c b/drivers/mfd/tps6594-spi.c
index a938a191744f..f4b4f37f957f 100644
--- a/drivers/mfd/tps6594-spi.c
+++ b/drivers/mfd/tps6594-spi.c
@@ -107,7 +107,7 @@ static int tps6594_spi_probe(struct spi_device *spi)
match = of_match_device(tps6594_spi_of_match_table, dev);
if (!match)
- return dev_err_probe(dev, PTR_ERR(match), "Failed to find matching chip ID\n");
+ return dev_err_probe(dev, -EINVAL, "Failed to find matching chip ID\n");
tps->chip_id = (unsigned long)match->data;
crc8_populate_msb(tps6594_spi_crc_table, TPS6594_CRC8_POLYNOMIAL);