Fix the smatch warnings that were recently introduced in the runtime pm
patch [0]:
drivers/spi/spi-cadence-quadspi.c:1882 cqspi_probe() warn: missing
unwind goto?
[0] https://lore.kernel.org/all/[email protected]/
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Signed-off-by: Dhruva Gole <[email protected]>
---
Link: https://lore.kernel.org/r/[email protected]
Tested locally using the following cmd:
make -j32 ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- drivers/spi/spi-cadence-quadspi.o CHECK="smatch -p=kernel" C=1 W=1
drivers/spi/spi-cadence-quadspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 4828da4587c5..e04f257c1067 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1879,7 +1879,7 @@ static int cqspi_probe(struct platform_device *pdev)
ret = devm_pm_runtime_enable(dev);
if (ret)
- return ret;
+ goto probe_setup_failed;
pm_runtime_set_autosuspend_delay(dev, CQSPI_AUTOSUSPEND_TIMEOUT);
pm_runtime_use_autosuspend(dev);
--
2.34.1