From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: "GONG, Ruiqi" <gongruiqi1@huawei.com>,
richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org, wangweiyang2@huawei.com
Subject: Re: [PATCH] mtd: rawnand: denali: Fix a possible resource leak in denali_pci_probe
Date: Mon, 19 Sep 2022 17:35:18 +0200 [thread overview]
Message-ID: <20220919173518.35742b2f@xps-13> (raw)
In-Reply-To: <dac8e781-5c2b-4ba1-34a7-d902ba060b29@wanadoo.fr>
Hi,
christophe.jaillet@wanadoo.fr wrote on Mon, 1 Aug 2022 20:26:07 +0200:
> Le 01/08/2022 à 10:03, GONG, Ruiqi a écrit :
> > Call pci_release_regions() to retrieve the allocated resource when
> > devm_ioremap() or denali_init() failed.
> >
>
> Hi,
> this is not correct.
>
> First, should you be right, you should also update the .remove() function the same way.
>
> Second, at the beginning there is pcim_enable_device() call.
> This looked like magic to me when I first saw it, but this function makes some pci_ functions work just as it they were pcim_ functions.
>
> See pcim_enable_device() ([1]), at line 2132.
> When pcim_release() ([2]) is called by the framework, then regions are released at line 2079
Interesting, I just see this answer now, please ignore my first comment
then, it's not useful.
Thanks Christophe for the feedback.
Cheers,
Miquèl
next prev parent reply other threads:[~2022-09-19 15:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 8:03 [PATCH] mtd: rawnand: denali: Fix a possible resource leak in denali_pci_probe GONG, Ruiqi
2022-08-01 18:26 ` Christophe JAILLET
2022-09-19 15:35 ` Miquel Raynal [this message]
2022-09-19 15:34 ` Miquel Raynal
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=20220919173518.35742b2f@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=gongruiqi1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=wangweiyang2@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