Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Tokunori Ikegami <ikegami.t@gmail.com>, linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: initialize identify ns data to NULL
Date: Tue, 26 Mar 2024 10:20:57 +0200	[thread overview]
Message-ID: <b7eb8b26-70bd-438f-90c6-e8165440be5a@grimberg.me> (raw)
In-Reply-To: <20240325154503.11510-1-ikegami.t@gmail.com>



On 25/03/2024 17:45, Tokunori Ikegami wrote:
> Currently nvme_identify_ns() sets the data to NULL if failed.

Where? Nothing sets id to NULL in nvme_identify_n(), what am I missing?
> Also the data is not freed if the function returned failure.

Where? I think you may be looking at a different code base?

--
int nvme_identify_ns(struct nvme_ctrl *ctrl, unsigned nsid,
                         struct nvme_id_ns **id)
{
         ....
         error = nvme_submit_sync_cmd(ctrl->admin_q, &c, *id, sizeof(**id));
         if (error) {
                 dev_warn(ctrl->device, "Identify namespace failed 
(%d)\n", error);
                 kfree(*id);
         }
         return error;
}

I don't see how this patch makes sense...


  reply	other threads:[~2024-03-26  8:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240325154544epcas5p4acf7f376241637872a433314489586fa@epcas5p4.samsung.com>
2024-03-25 15:45 ` [PATCH] nvme: initialize identify ns data to NULL Tokunori Ikegami
2024-03-26  8:20   ` Sagi Grimberg [this message]
2024-03-26 13:35     ` Tokunori Ikegami
2024-03-26  8:50   ` Kanchan Joshi
2024-03-26 13:51     ` Tokunori Ikegami
     [not found]     ` <a92a1493-29ae-4f89-b17b-54d03ec0becc@gmail.com>
2024-03-26 14:02       ` Kanchan Joshi
2024-03-26 14:56         ` Tokunori Ikegami
2024-03-26 15:37   ` Keith Busch
2024-03-26 15:54     ` Tokunori Ikegami

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=b7eb8b26-70bd-438f-90c6-e8165440be5a@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=ikegami.t@gmail.com \
    --cc=linux-nvme@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