From: Raphael Gallais-Pou <rgallaispou@gmail.com>
To: Patrick Delaunay <patrick.delaunay@foss.st.com>,
Patrice Chotard <patrice.chotard@foss.st.com>,
uboot-stm32@st-md-mailman.stormreply.com, u-boot@lists.denx.de
Cc: Anatolij Gustschin <ag.dev.uboot@gmail.com>,
Tom Rini <trini@konsulko.com>
Subject: [PATCH] video: stm32: dsi: fix unchecked return values
Date: Sun, 12 Apr 2026 21:07:58 +0200 [thread overview]
Message-ID: <20260412-master-v1-1-d7a8e742233c@gmail.com> (raw)
Fix the following errors yielded by Coverity Scan:
CID 644836: Error handling issues (CHECKED_RETURN)
Calling device_chld_unbind without checking return value (as is done elsewhere 6 out of 7 times)
CID 644834: Error handling issues (CHECKED_RETURN)
Calling device_chld_remove without checking return value (as is done elsewhere 4 out of 5 times).
Link: https://lore.kernel.org/r/20260309212331.GF1388590@bill-the-cat/
Fixes: a6d047c0a86b ("video: stm32: remove all child of DSI bridge when its probe failed")
Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com>
---
drivers/video/stm32/stm32_dsi.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
index 65a91f5cff7a..5c4d8d2aab51 100644
--- a/drivers/video/stm32/stm32_dsi.c
+++ b/drivers/video/stm32/stm32_dsi.c
@@ -493,8 +493,11 @@ static int stm32_dsi_probe(struct udevice *dev)
priv->hw_version != HWVER_131) {
dev_err(dev, "DSI version 0x%x not supported\n", priv->hw_version);
dev_dbg(dev, "remove and unbind all DSI child\n");
- device_chld_remove(dev, NULL, DM_REMOVE_NORMAL);
- device_chld_unbind(dev, NULL);
+ ret = device_chld_remove(dev, NULL, DM_REMOVE_NORMAL);
+ if (!ret)
+ ret = device_chld_unbind(dev, NULL);
+ if (ret)
+ dev_err(dev, "Unbinding from %s failed %d\n", dev->name, ret);
ret = -ENODEV;
goto err_clk;
}
---
base-commit: e2fa3e570f83ab0f9ce667ddaec9dc738bcf05b9
change-id: 20260412-master-8be67866e096
Best regards,
--
Raphael Gallais-Pou <rgallaispou@gmail.com>
reply other threads:[~2026-04-12 20:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260412-master-v1-1-d7a8e742233c@gmail.com \
--to=rgallaispou@gmail.com \
--cc=ag.dev.uboot@gmail.com \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@foss.st.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-stm32@st-md-mailman.stormreply.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