mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhihao Cheng <chengzhihao1@huawei.com>
To: Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Daniel Golle <daniel@makrotopia.org>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mtd: ubi: fix unreleased fwnode_handle in find_volume_fwnode()
Date: Mon, 21 Oct 2024 10:29:51 +0800	[thread overview]
Message-ID: <f475a196-db30-7aef-6bc7-3c7d0e962382@huawei.com> (raw)
In-Reply-To: <20241019-mtd-uvi-fwnode_handle_put-v1-1-f5ef0d0cf9c8@gmail.com>

在 2024/10/20 4:27, Javier Carrasco 写道:
> The 'fw_vols' fwnode_handle initialized via
> device_get_named_child_node() requires explicit calls to
> fwnode_handle_put() when the variable is no longer required.
> 
> Add the missing calls to fwnode_handle_put() before the function
> returns.
> 
> Fixes: 51932f9fc487 ("mtd: ubi: populate ubi volume fwnode")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>   drivers/mtd/ubi/vmt.c | 2 ++
>   1 file changed, 2 insertions(+)

Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
> 
> diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
> index 5a3558bbb903..e5cf3bdca3b0 100644
> --- a/drivers/mtd/ubi/vmt.c
> +++ b/drivers/mtd/ubi/vmt.c
> @@ -143,8 +143,10 @@ static struct fwnode_handle *find_volume_fwnode(struct ubi_volume *vol)
>   		    vol->vol_id != volid)
>   			continue;
>   
> +		fwnode_handle_put(fw_vols);
>   		return fw_vol;
>   	}
> +	fwnode_handle_put(fw_vols);
>   
>   	return NULL;
>   }
> 
> ---
> base-commit: f2493655d2d3d5c6958ed996b043c821c23ae8d3
> change-id: 20241019-mtd-uvi-fwnode_handle_put-7b220d2778b5
> 
> Best regards,
> 


      parent reply	other threads:[~2024-10-21  2:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-19 20:27 Javier Carrasco
2024-10-19 20:32 ` Javier Carrasco
2024-10-21  2:29 ` Zhihao Cheng [this message]

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=f475a196-db30-7aef-6bc7-3c7d0e962382@huawei.com \
    --to=chengzhihao1@huawei.com \
    --cc=daniel@makrotopia.org \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.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

all inboxes | Powered by JetHome®