Linux on Apple ARM platform development
 help / color / mirror / Atom feed
* [bug report] nvme-apple: Destroy the admin queue on removal
@ 2026-09-14 10:34 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2026-09-14 10:34 UTC (permalink / raw)
  To: Sven Peter; +Cc: asahi, linux-nvme

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-14 10:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 10:34 [bug report] nvme-apple: Destroy the admin queue on removal Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox