diff options
| author | Peng Fan <peng.fan@nxp.com> | 2026-04-13 18:52:43 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-04-13 18:00:34 +0100 |
| commit | 54a032d3e62fd1792cb16d8096aaf00397589c5f (patch) | |
| tree | 06a1022bf887928d564e44ece3b8b65480346766 /include/linux/timerqueue.h | |
| parent | bc9b1ebaa7624edde54d4ae842d11cebb26db09b (diff) | |
ASoC: pxa2xx-ac97: fix error handling for reset GPIO descriptor
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: c76d50b71e89 ("ASoC: ac97: Convert to GPIO descriptors")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202604041426.i2C1xqHk-lkp@intel.com/
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20260413-ac97-v1-1-b44b9e084307@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
