mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
iio: adc: aspeed: propagate reset deassert errors
aspeed_adc_probe() continues to register ADC resources after deasserting
the shared reset, even if the reset controller reports a failure.
A failed deassertion leaves the hardware unavailable, so stop probing
before installing the cleanup action and enabling the ADC.
Fixes: edf7550a1f ("iio: adc: aspeed: Deassert reset in probe")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
This commit is contained in:
parent
0d0ffbcc92
commit
95e4eb426b
|
|
@ -585,7 +585,9 @@ static int aspeed_adc_probe(struct platform_device *pdev)
|
|||
return dev_err_probe(dev, PTR_ERR(data->rst),
|
||||
"invalid or missing reset controller device tree entry");
|
||||
|
||||
reset_control_deassert(data->rst);
|
||||
ret = reset_control_deassert(data->rst);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = devm_add_action_or_reset(dev, aspeed_adc_reset_assert, data->rst);
|
||||
if (ret)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user