diff options
author | 2025-05-01 17:02:00 +0200 | |
---|---|---|
committer | 2025-05-05 19:31:28 +0900 | |
commit | f4ea37a485e97234af9550b63c52394d029037ee (patch) | |
tree | ee2479078d6a88742ab6bfff0c0759c2a6fdf579 /scripts/lib/kdoc/kdoc_files.py | |
parent | spi: atmel-quadspi: Fix printed error code during DMA setup (diff) | |
download | wireguard-linux-f4ea37a485e97234af9550b63c52394d029037ee.tar.xz wireguard-linux-f4ea37a485e97234af9550b63c52394d029037ee.zip |
spi: cs42l43: Make handling missing spk-id GPIOs explicit
gpiod_get_array_optional() for spk-id GPIOs can return NULL, if they are
missing, so do not pass the value to PTR_ERR but instead explicitly
treat NULL as acceptable condition. The old code was correct, but
misleading because PTR_ERR usually is used on errors.
Reported by Smatch:
drivers/spi/spi-cs42l43.c:241 cs42l43_get_speaker_id_gpios() warn: passing zero to 'PTR_ERR'
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250501-n-smatch-fixes-v2-2-d2ad9c1f2e67@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions