Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Dan Carpenter" <error27@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, arm <arm@kernel.org>
Subject: Re: [soc:board-remove 200/200] drivers/mmc/host/sdhci-pxav2.c:318 sdhci_pxav2_probe() error: we previously assumed 'variant' could be null (see line 305)
Date: Wed, 19 Aug 2026 13:02:09 +0200	[thread overview]
Message-ID: <e45c75c5-70e3-496b-8885-ab0093234d3a@app.fastmail.com> (raw)
In-Reply-To: <202608191405.jP6epa63-lkp@intel.com>

On Wed, Aug 19, 2026, at 09:54, Dan Carpenter wrote:
> dfe9746aed2d12 Doug Brown            2023-01-16  304  	variant = 
> of_device_get_match_data(dev);
> dfe9746aed2d12 Doug Brown            2023-01-16 @305  	if (variant)
>
> This assumes "variant" can be NULL.
>
> dfe9746aed2d12 Doug Brown            2023-01-16  319  	host->ops = 
> variant->ops;
>
> But later it's dereferenced without checking.
>

Hi Dan,

Thanks for the report! I've fixed it up now, by removing the (now)
pointless NULL check.

As you may have seen, there are a lot of changes in this branch,
and I assume there are still many things that smatch will find here
as it is still work in progress.

If you have a list of possible regressions that smatch has already
found on this branch, I'd be happy to look through the raw data
for actual bugs and fix them before you spend a lot of time
processing the findings.

    Arnd


  reply	other threads:[~2026-08-19 11:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19  7:54 [soc:board-remove 200/200] drivers/mmc/host/sdhci-pxav2.c:318 sdhci_pxav2_probe() error: we previously assumed 'variant' could be null (see line 305) Dan Carpenter
2026-08-19 11:02 ` Arnd Bergmann [this message]
2026-08-19 11:07   ` Dan Carpenter
2026-08-19 11:29     ` Arnd Bergmann

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=e45c75c5-70e3-496b-8885-ab0093234d3a@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=arm@kernel.org \
    --cc=error27@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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