[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aBOUTIoIPeyJSvam@opensource.cirrus.com>
Date: Thu, 1 May 2025 16:33:32 +0100
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Mark Brown <broonie@...nel.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
David Rhodes <david.rhodes@...rus.com>,
Richard Fitzgerald <rf@...nsource.cirrus.com>,
linux-spi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-sound@...r.kernel.org,
patches@...nsource.cirrus.com
Subject: Re: [PATCH v2 2/3] spi: cs42l43: Make handling missing spk-id GPIOs
explicit
On Thu, May 01, 2025 at 05:02:00PM +0200, Krzysztof Kozlowski wrote:
> 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@...aro.org>
> ---
Reviewed-by: Charles Keepax <ckeepax@...nsource.cirrus.com>
Thanks,
Charles
Powered by blists - more mailing lists