mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00: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:
|
History
|
|
|---|---|---|
| .. | ||
| aaci.c | ||
| aaci.h | ||
| Kconfig | ||
| Makefile | ||
| pxa2xx-ac97-lib.c | ||
| pxa2xx-ac97-regs.h | ||
| pxa2xx-pcm-lib.c | ||