Christophe JAILLET d221b844ee
ASoC: cs42l51: Fix some error handling paths in cs42l51_probe()
If devm_gpiod_get_optional() fails, we need to disable previously enabled
regulators, as done in the other error handling path of the function.

Also, gpiod_set_value_cansleep(, 1) needs to be called to undo a
potential gpiod_set_value_cansleep(, 0).
If the "reset" gpio is not defined, this additional call is just a no-op.

This behavior is the same as the one already in the .remove() function.

Fixes: 11b9cd748e31 ("ASoC: cs42l51: add reset management")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/a5e5f4b9fb03f46abd2c93ed94b5c395972ce0d1.1729975570.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-28 12:21:17 +00:00
..
2024-06-10 12:48:36 +01:00
2021-04-20 17:25:51 +01:00
2024-08-01 12:51:45 +01:00
2024-06-28 13:39:30 +01:00
2024-08-26 15:52:09 +01:00
2023-09-11 13:34:39 +01:00
2023-12-06 23:06:55 +00:00
2023-12-01 16:59:23 +00:00
2023-08-11 21:12:45 +02:00
2021-03-31 18:00:38 +01:00
2024-08-19 19:57:56 +01:00
2024-03-26 11:24:24 +00:00
2024-01-12 11:55:28 -08:00
2024-09-05 12:31:03 +01:00
2024-09-14 09:09:59 +02:00
2024-09-05 12:31:03 +01:00
2018-04-26 12:44:15 +01:00
2024-09-05 12:31:03 +01:00
2024-09-05 12:31:03 +01:00
2024-03-28 15:54:04 +00:00
2024-06-18 16:45:46 +01:00
2024-10-17 12:11:33 +01:00
2024-10-17 12:11:33 +01:00
2024-10-17 12:11:33 +01:00
2024-10-17 12:11:33 +01:00
2024-04-03 16:07:41 +01:00
2024-04-03 16:07:41 +01:00
2024-04-30 00:15:57 +09:00
2024-04-30 00:15:57 +09:00
2020-05-07 13:18:04 +01:00
2022-10-13 13:01:32 +01:00
2024-04-03 16:07:41 +01:00
2024-04-03 16:07:41 +01:00
2024-04-03 16:07:41 +01:00
2021-12-06 10:04:05 +01:00
2022-07-08 11:52:42 +01:00
2021-12-06 10:04:05 +01:00
2018-06-01 12:05:30 +01:00
2020-07-20 15:34:29 +01:00
2020-10-02 21:05:29 +01:00
2024-08-08 09:14:57 +01:00
2024-08-08 09:14:57 +01:00