From: Dan Williams <dan.j.williams@intel.com>
To: Wu Bo <wubo40@huawei.com>
Cc: linux-nvdimm <linux-nvdimm@lists.01.org>,
liuzhiqiang26@huawei.com, linfeilong@huawei.com
Subject: Re: [PATCH] nvdimm: cleanup resources when the initialization fails
Date: Thu, 9 Apr 2020 20:20:22 -0700 [thread overview]
Message-ID: <CAPcyv4hH7nO0_-pMckzWbKGckKy74KD7nWERB3q7TLrVTj+UXQ@mail.gmail.com> (raw)
In-Reply-To: <c9f9975c-b4ae-1234-56ed-dce4b052080d@huawei.com>
On Thu, Apr 9, 2020 at 8:16 PM Wu Bo <wubo40@huawei.com> wrote:
>
> From: Wu Bo <wubo40@huawei.com>
>
> When the initialization fails, add the cleanup resources
> in pmem_attach_disk() function
Are you familiar with devm?
devm routines take care of this automatically on driver probe error conditions.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next prev parent reply other threads:[~2020-04-10 3:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-10 3:15 [PATCH] nvdimm: cleanup resources when the initialization fails Wu Bo
2020-04-10 3:20 ` Dan Williams [this message]
2020-04-10 4:23 ` Wu Bo
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=CAPcyv4hH7nO0_-pMckzWbKGckKy74KD7nWERB3q7TLrVTj+UXQ@mail.gmail.com \
--to=dan.j.williams@intel.com \
--cc=linfeilong@huawei.com \
--cc=linux-nvdimm@lists.01.org \
--cc=liuzhiqiang26@huawei.com \
--cc=wubo40@huawei.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;
as well as URLs for NNTP newsgroup(s).