[PATCH v2] ALSA: atmel: ac97c: fix reset GPIO error handling

Takashi Iwai tiwai at suse.de
Fri Nov 27 09:37:23 PST 2026


On Fri, 27 Nov 2026 11:06:45 +0100,
Sreeraj S Kurup wrote:
> 
> The driver currently ignores errors returned by
> devm_gpiod_get_index() and continues probing. This can cause problems
> when the GPIO provider is not ready and the function returns
> -EPROBE_DEFER.
> 
> Use devm_gpiod_get_index_optional() to handle the reset GPIO as
> optional. If the GPIO is not available, the driver can continue using
> the internal reset mechanism. If GPIO acquisition fails for another
> reason, return the error using dev_err_probe().
> 
> Also, check the GPIO descriptor for NULL in atmel_ac97c_reset(),
> because the optional GPIO API returns NULL when no GPIO is assigned.
> 
> Fixes: 5f10e84934e4 ("ALSA: atmel: convert AC97c driver to GPIO descriptor API")
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239 at gmail.com>

Applied to for-next branch.  Thanks.


Takashi



More information about the linux-arm-kernel mailing list