Tony Lindgren
480f905c94
spi: Fix regression to return zero on success instead of positive value
...
Commit d948e6ca1899 ("spi: add power control when set_cs") added generic
runtime PM handling, but also changed the return value to be 1 instead
of 0 that we had earlier as pm_runtime_get functions return a positve
value on success.
This causes SPI devices to return errors for cases where they do:
ret = spi_setup(spi);
if (ret)
return ret;
As in many cases the SPI devices do not check for if (ret < 0).
Let's fix this by setting the status to 0 on succeess after the
runtime PM calls. Let's not return 0 at the end of the function
as this might break again later on if the function changes and
starts returning status again.
Fixes: d948e6ca1899 ("spi: add power control when set_cs")
Cc: Luhua Xu <luhua.xu@mediatek.com>
Cc: wsd_upstream@mediatek.com
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20191111195334.44833-1-tony@atomide.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-17 02:13:45 +07:00
..
2023-02-17 02:13:41 +07:00
2023-02-17 02:13:41 +07:00
2023-02-17 02:13:41 +07:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2020-01-23 22:50:01 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2020-12-13 20:08:34 +03:00
2021-01-12 18:29:40 +03:00
2022-02-10 14:46:26 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2019-07-15 18:26:14 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2021-02-08 23:43:46 +03:00
2018-11-15 21:36:32 +03:00
2020-01-13 18:05:44 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2021-01-12 18:29:40 +03:00
2021-05-26 21:04:22 +03:00
2020-06-21 20:40:15 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2020-06-21 20:40:15 +03:00
2020-05-25 14:01:29 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2020-07-25 00:36:12 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2020-02-08 10:10:33 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2022-06-20 23:23:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2021-07-25 20:02:04 +03:00
2018-11-15 21:36:32 +03:00
2023-02-17 02:13:44 +07:00
2022-01-31 17:10:19 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2023-02-17 02:13:45 +07:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2019-12-02 12:51:20 +03:00
2022-10-26 16:33:33 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2021-09-23 10:21:59 +03:00
2021-12-09 13:01:03 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2021-03-16 19:12:45 +03:00
2021-02-08 23:37:08 +03:00
2018-11-15 21:36:32 +03:00
2022-10-26 16:33:33 +03:00
2021-01-12 18:29:40 +03:00
2019-11-27 18:47:50 +03:00
2019-06-10 13:09:45 +03:00
2018-11-15 21:36:32 +03:00
2021-03-16 19:12:45 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2021-01-12 18:29:40 +03:00
2018-11-15 21:36:32 +03:00
2019-12-02 12:51:20 +03:00
2018-11-15 21:36:32 +03:00
2021-01-12 18:29:40 +03:00
2018-11-15 21:36:32 +03:00
2021-01-12 18:29:40 +03:00
2018-11-15 21:36:32 +03:00
2021-07-25 20:02:04 +03:00
2021-01-12 18:29:40 +03:00
2022-04-25 16:25:23 +03:00
2022-04-25 16:25:23 +03:00
2018-11-15 21:36:32 +03:00
2022-06-20 23:23:32 +03:00
2018-11-15 21:36:32 +03:00
2021-07-25 20:02:04 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2018-11-15 21:36:32 +03:00
2020-04-03 13:42:03 +03:00
2023-02-17 02:13:45 +07:00
2020-07-25 00:36:12 +03:00