iio: dac: stm32-dac: better handle reset controller failures
authorEtienne Carriere <etienne.carriere@st.com>
Mon, 13 Jan 2020 13:14:26 +0000 (14:14 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 18 Jan 2020 14:32:01 +0000 (14:32 +0000)
commitd344961f55fd6321937d3bc92ad3930dea31189f
treed4736fa663aebd430adcd349b8b4310270df7a0c
parent4a001c96b1c6d39831be3ef957968404be96d75e
iio: dac: stm32-dac: better handle reset controller failures

Use devm_reset_control_get_optional_exclusive() instead of
devm_reset_control_get_exclusive() as reset controller is optional.

Nevertheless if reset controller is expected but reports an
error, propagate the error code to the caller. In such case
a nice error trace is emitted unless we're deferring the probe
operation.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/stm32-dac-core.c