All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Sven Peter <sven@kernel.org>
Cc: asahi@lists.linux.dev, linux-nvme@lists.infradead.org
Subject: [bug report] nvme-apple: Destroy the admin queue on removal
Date: Mon, 14 Sep 2026 13:34:46 +0300	[thread overview]
Message-ID: <aqfNxqqlIRbClbOk@stanley.mountain> (raw)

Hello Sven Peter,

Commit 87d5b9864c81 ("nvme-apple: Destroy the admin queue on
removal") from Aug 6, 2026, leads to the following Smatch complaint:

    drivers/nvme/host/apple.c:1642 apple_nvme_remove()
    warn: variable dereferenced before check 'anv->ctrl.admin_q' (see line 1641)

drivers/nvme/host/apple.c
  1640		nvme_remove_namespaces(&anv->ctrl);
  1641		apple_nvme_disable(anv, true);
                                   ^^^
This dereferences anv->ctrl.admin_q

  1642		if (anv->ctrl.admin_q && !blk_queue_dying(anv->ctrl.admin_q)) {
                    ^^^^^^^^^^^^^^^^^
So this NULL check is pointless and can be removed.

  1643			/*
  1644			 * If the controller was reset during removal, it's possible

This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter


                 reply	other threads:[~2026-09-14 10:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=aqfNxqqlIRbClbOk@stanley.mountain \
    --to=error27@gmail.com \
    --cc=asahi@lists.linux.dev \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sven@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.