mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
The reset GPIO obtained via devm_gpiod_get() may return an ERR_PTR()
when the GPIO is missing or an error occurs. The current code
unconditionally assigns PTR_ERR() to ret and later dereferences
rst_gpio via desc_to_gpio(), which is incorrect when rst_gpio is an
error pointer.
Rework the logic to first check IS_ERR(rst_gpio) before converting the
descriptor. Handle -ENOENT by disabling reset GPIO support, and return
other errors to the caller as expected.
Fixes:
|
||
|---|---|---|
| .. | ||
| aaci.c | ||
| aaci.h | ||
| Kconfig | ||
| Makefile | ||
| pxa2xx-ac97-lib.c | ||
| pxa2xx-ac97-regs.h | ||
| pxa2xx-pcm-lib.c | ||