linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Mark Brown <broonie@kernel.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	David Rhodes <david.rhodes@cirrus.com>,
	Richard Fitzgerald <rf@opensource.cirrus.com>,
	linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
	patches@opensource.cirrus.com
Subject: Re: [PATCH v2 2/3] spi: cs42l43: Make handling missing spk-id GPIOs explicit
Date: Thu, 1 May 2025 16:33:32 +0100	[thread overview]
Message-ID: <aBOUTIoIPeyJSvam@opensource.cirrus.com> (raw)
In-Reply-To: <20250501-n-smatch-fixes-v2-2-d2ad9c1f2e67@linaro.org>

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@linaro.org>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles


  reply	other threads:[~2025-05-01 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-01 15:01 [PATCH v2 0/3] spi: Minor smatch fixes Krzysztof Kozlowski
2025-05-01 15:01 ` [PATCH v2 1/3] spi: atmel-quadspi: Fix printed error code during DMA setup Krzysztof Kozlowski
2025-05-01 15:02 ` [PATCH v2 2/3] spi: cs42l43: Make handling missing spk-id GPIOs explicit Krzysztof Kozlowski
2025-05-01 15:33   ` Charles Keepax [this message]
2025-05-01 15:02 ` [PATCH v2 3/3] spi: cadence-quadspi: Assume device could match via platform Krzysztof Kozlowski
2025-05-05 23:46 ` [PATCH v2 0/3] spi: Minor smatch fixes Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aBOUTIoIPeyJSvam@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=david.rhodes@cirrus.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=patches@opensource.cirrus.com \
    --cc=rf@opensource.cirrus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).