From: "Francis, Neha" <n-francis@ti.com>
To: Christian Marangi <ansuelsmth@gmail.com>,
Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
Quentin Schulz <quentin.schulz@cherry.de>,
Peng Fan <peng.fan@nxp.com>,
Casey Connolly <casey.connolly@linaro.org>,
"Paul Kocialkowski" <paulk@sys-base.io>,
Chen-Yu Tsai <wens@kernel.org>,
"Justin Klaassen" <justin@tidylabs.net>,
Harsha Vardhan V M <h-vm@ti.com>,
"Jamie Gibbons" <jamie.gibbons@microchip.com>,
Leo Yu-Chi Liang <ycliang@andestech.com>,
Weijie Gao <weijie.gao@mediatek.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Lucien.Jheng <lucienzx159@gmail.com>,
"Alif Zakuan Yuslaimi" <alif.zakuan.yuslaimi@altera.com>,
Sky Huang <SkyLake.Huang@mediatek.com>, <u-boot@lists.denx.de>
Subject: Re: [PATCH v2 1/5] misc: fs_loader: fix ubifs not unmounted on dev_get_priv error
Date: Tue, 17 Mar 2026 11:10:03 +0530 [thread overview]
Message-ID: <92bce3f5-9d24-45c0-82b0-4e15ed52fbda@ti.com> (raw)
In-Reply-To: <20260306190542.22920-2-ansuelsmth@gmail.com>
Hi Christian
On 3/7/2026 12:35 AM, Christian Marangi wrote:
> When dev_get_priv errors out, the ubifs is not umounted (if used).
>
> Correctly handle this handle condition and while at it also return -EINVAL
> instead of -ENOMEM as a better error since no memory is allocated but is
> actually an invalid scenario for fw_get_filesystem_firmware().
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> drivers/misc/fs_loader.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
> index 2928cf75f89e..7e432a7ebd62 100644
> --- a/drivers/misc/fs_loader.c
> +++ b/drivers/misc/fs_loader.c
> @@ -178,8 +178,10 @@ static int fw_get_filesystem_firmware(struct udevice *dev)
>
> struct firmware *firmwarep = dev_get_priv(dev);
>
> - if (!firmwarep)
> - return -ENOMEM;
> + if (!firmwarep) {
> + ret = -EINVAL;
> + goto out;
> + }
>
> ret = fs_read(firmwarep->name, (ulong)map_to_sysmem(firmwarep->data),
> firmwarep->offset, firmwarep->size, &actread);
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
--
Thanking You
Neha Malcom Francis
next prev parent reply other threads:[~2026-03-17 5:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 19:05 [PATCH v2 0/5] misc: fs_loader: reorg and split to FS and FW loader + FIP loader Christian Marangi
2026-03-06 19:05 ` [PATCH v2 1/5] misc: fs_loader: fix ubifs not unmounted on dev_get_priv error Christian Marangi
2026-03-16 2:43 ` Simon Glass
2026-03-17 5:40 ` Francis, Neha [this message]
2026-03-06 19:05 ` [PATCH v2 2/5] misc: fs_loader: reorganize and split to FS and FW loader Christian Marangi
2026-03-17 6:06 ` Francis, Neha
2026-03-06 19:05 ` [PATCH v2 3/5] misc: fw_loader: implement generic get_fw_loader_from_node() Christian Marangi
2026-03-17 6:18 ` Francis, Neha
2026-03-06 19:05 ` [PATCH v2 4/5] misc: fw_loader: introduce FIP loader driver Christian Marangi
2026-03-17 6:54 ` Francis, Neha
2026-03-06 19:05 ` [PATCH v2 5/5] misc: fw_loader: implement request_firmware_size() OP Christian Marangi
2026-03-17 7:02 ` Francis, Neha
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=92bce3f5-9d24-45c0-82b0-4e15ed52fbda@ti.com \
--to=n-francis@ti.com \
--cc=SkyLake.Huang@mediatek.com \
--cc=alif.zakuan.yuslaimi@altera.com \
--cc=ansuelsmth@gmail.com \
--cc=casey.connolly@linaro.org \
--cc=h-vm@ti.com \
--cc=jamie.gibbons@microchip.com \
--cc=justin@tidylabs.net \
--cc=lucienzx159@gmail.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=paulk@sys-base.io \
--cc=peng.fan@nxp.com \
--cc=quentin.schulz@cherry.de \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=weijie.gao@mediatek.com \
--cc=wens@kernel.org \
--cc=ycliang@andestech.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