public inbox for openbmc@ozlabs.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: "Felix Gu" <ustc.gu@gmail.com>,
	linux-spi@vger.kernel.org, openbmc@lists.ozlabs.org,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
	"Mark Brown" <broonie@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] spi: wpcm-fiu: Fix potential NULL pointer dereference in wpcm_fiu_probe()
Date: Fri, 13 Feb 2026 09:54:09 +0100	[thread overview]
Message-ID: <c4db3d6a-b683-4b5b-943d-c0be91caad1d@web.de> (raw)
In-Reply-To: <20260212-wpcm-v1-1-5b7c4f526aac@gmail.com>

> platform_get_resource_byname() can return NULL, which would cause a crash
> when passed the pointer to resource_size().
> 
> Move the fiu->memory_size assignment after the error check for
> devm_ioremap_resource() to prevent the potential NULL pointer dereference.

Were any source code analysis tools involved here?

Regards,
Markus


  reply	other threads:[~2026-02-13  9:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12 12:41 [PATCH] spi: wpcm-fiu: Fix potential NULL pointer dereference in wpcm_fiu_probe() Felix Gu
2026-02-13  8:54 ` Markus Elfring [this message]
2026-02-13 11:00 ` J. Neuschäfer
2026-02-16 18:08 ` 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=c4db3d6a-b683-4b5b-943d-c0be91caad1d@web.de \
    --to=markus.elfring@web.de \
    --cc=broonie@kernel.org \
    --cc=j.neuschaefer@gmx.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=ustc.gu@gmail.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