Re: [PATCH 1/2] ASoC: codecs: rt5645: Simplify optional GPIO error handling

From: Alvin Šipraga

Date: Fri Oct 09 2026 - 11:49:59 EST


On Fri, Oct 09, 2026 at 06:22:03PM +0700, phucduc.bui@xxxxxxxxx wrote:
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> gpiod_not_found() converts -ENOENT to NULL before
> devm_gpiod_get_optional() returns, so there is no need to handle
> -ENOENT explicitly.
>
> Use dev_err_probe() to simplify error reporting and handle
> -EPROBE_DEFER.
>
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>

Reviewed-by: Alvin Šipraga <alvin.sipraga@xxxxxxxxxx>

> ---
> sound/soc/codecs/rt5645.c | 22 ++++++----------------
> 1 file changed, 6 insertions(+), 16 deletions(-)