[PATCH 06/13] spi: ti-qspi: Discard pm_runtime_put_autosuspend() return value
From: Brian Norris
Date: Tue Oct 06 2026 - 19:23:32 EST
Failing SPI setup due to pm_runtime_put_autosuspend() returning a
negative value is not particularly useful.
Returning an error code from pm_runtime_put_autosuspend() merely means
that it has not queued up a timer or work item to check whether or not
the device can be suspended and there are many perfectly valid
situations in which that can happen, like after writing "on" to the
device's runtime PM "control" attribute in sysfs for one example.
Accordingly, update ti_qspi_setup() to simply discard the return value
of pm_runtime_put_autosuspend().
This will facilitate a planned change of the
pm_runtime_put_autosuspend() return type to void in the future, similar
to commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return
type to void").
Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>
---
This patch is independent of the rest of the series, except for the end
(changing the return type). I expect it can be applied by individual
maintainers, and we pick up the end once the dust is settled.
drivers/spi/spi-ti-qspi.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 34b154922ff2..63b9098ec8a2 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -158,11 +158,7 @@ static int ti_qspi_setup(struct spi_device *spi)
return ret;
}
- ret = pm_runtime_put_autosuspend(qspi->dev);
- if (ret < 0) {
- dev_err(qspi->dev, "pm_runtime_put_autosuspend() failed\n");
- return ret;
- }
+ pm_runtime_put_autosuspend(qspi->dev);
return 0;
}
--
2.56.0.360.g66cac248cb-goog