[PATCH v1] firmware: microchip: fail auto-update probe if no flash found
Conor Dooley
conor at kernel.org
Thu Mar 12 11:01:24 PDT 2026
On Tue, Mar 10, 2026 at 06:24:11PM +0000, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley at microchip.com>
>
> On Tue, 03 Mar 2026 11:24:06 +0000, Conor Dooley wrote:
> > There's no point letting the driver probe if there is no flash, as
> > trying to do a firmware upload will fail. Move the code that attempts
> > to get the flash from firmware upload to probe, and let it emit a
> > message to users stating why auto-update is not supported.
> > The code currently could have a problem if there's a flash in
> > devicetree, but the system controller driver fails to get a pointer to
> > it from the mtd subsystem, which will cause
> > mpfs_sys_controller_get_flash() to return an error. Check for errors and
> > null, instead of just null, in the new clause.
> >
> > [...]
>
> Applied to riscv-soc-fixes, thanks!
>
> [1/1] firmware: microchip: fail auto-update probe if no flash found
> https://git.kernel.org/conor/c/c30b2509164f
My CI started whinging about this..
Probably needs to be:
commit 8fc167b47d48d3653639d026cc3f657f6c78ab4d
Author: Conor Dooley <conor.dooley at microchip.com>
Date: Thu Mar 12 18:00:01 2026 +0000
firmware: microchip: auto-update: silence error print when flash not found
Signed-off-by: Conor Dooley <conor.dooley at microchip.com>
diff --git a/drivers/firmware/microchip/mpfs-auto-update.c b/drivers/firmware/microchip/mpfs-auto-update.c
index 0105c55ed7f37..8fc3749d4a709 100644
--- a/drivers/firmware/microchip/mpfs-auto-update.c
+++ b/drivers/firmware/microchip/mpfs-auto-update.c
@@ -424,9 +424,10 @@ static int mpfs_auto_update_probe(struct platform_device *pdev)
"Could not register as a sub device of the system controller\n");
priv->flash = mpfs_sys_controller_get_flash(priv->sys_controller);
- if (IS_ERR_OR_NULL(priv->flash))
- return dev_err_probe(dev, -ENODEV,
- "No flash connected to the system controller, auto-update not supported\n");
+ if (IS_ERR_OR_NULL(priv->flash)) {
+ dev_dbg(dev, "No flash connected to the system controller, auto-update not supported\n");
+ return -ENODEV;
+ }
priv->dev = dev;
platform_set_drvdata(pdev, priv);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20260312/692a273d/attachment.sig>
More information about the linux-riscv
mailing list