From: sashiko-bot@kernel.org
To: "Bryan O'Donoghue" <bryan.odonoghue@linaro.org>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v12 3/6] media: qcom: camss: Add support to populate sub-devices
Date: Wed, 08 Jul 2026 00:18:48 +0000 [thread overview]
Message-ID: <20260708001848.DE5EC1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v12-3-f8588da41f16@linaro.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [Medium] The return value of `devm_of_platform_populate()` is ignored, leading to silent initialization failures and potential permanent resource leaks.
Pre-existing issues:
- [High] Missing NULL check for the result of `of_device_get_match_data()` leads to a potential NULL pointer dereference.
--
--- Patch [3]: [PATCH v12 3/6] media: qcom: camss: Add support to populate sub-devices ---
commit 187ecc190c79a7e3479de2344bee652ac9f2b71f
Author: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
media: qcom: camss: Add support to populate sub-devices
This commit updates the Qualcomm Camera Subsystem (CAMSS) probe function
to use devm_of_platform_populate() for populating sub-devices in the tree.
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index 2123f6388e3d7..95e655a8b6aa0 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
[ ... ]
> @@ -5362,6 +5363,8 @@ static int camss_probe(struct platform_device *pdev)
> if (!camss)
> return -ENOMEM;
>
> + devm_of_platform_populate(dev);
[Severity: Medium]
Should the return value of devm_of_platform_populate() be checked here?
When this function fails, it returns a negative error code and the devres
framework frees the associated devres action rather than attaching it to the
parent device.
If the population fails midway, could this leave successfully created child
devices dangling, resulting in a permanent resource leak upon device unbind?
> +
> camss->res = of_device_get_match_data(dev);
[Severity: High]
This is a pre-existing issue, but is it possible for
of_device_get_match_data() to return NULL here?
If the driver is bound via sysfs to a platform device that lacks an OF node
(for instance, one manually created and bound by root),
of_device_get_match_data() will return NULL.
Would this lead to a NULL pointer dereference shortly after this line when
accessing camss->res->csiphy_num during the csiphy allocation?
>
> atomic_set(&camss->ref_count, 0);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260708-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v12-0-f8588da41f16@linaro.org?part=3
next prev parent reply other threads:[~2026-07-08 0:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 0:06 [PATCH v12 0/6] Add dt-bindings and PHY updates for CAMSS on x1e80100 silicon Bryan O'Donoghue
2026-07-08 0:06 ` [PATCH v12 1/6] dt-bindings: media: qcom,x1e80100-camss: Add optional PHY handle definitions Bryan O'Donoghue
2026-07-08 0:16 ` sashiko-bot
2026-07-08 1:34 ` Rob Herring (Arm)
2026-07-08 7:49 ` Vladimir Zapolskiy
2026-07-08 22:09 ` Frank Li
2026-07-08 22:15 ` Bryan O'Donoghue
2026-07-08 0:06 ` [PATCH v12 2/6] dt-bindings: media: qcom,x1e80100-camss: Describe iommu entries Bryan O'Donoghue
2026-07-08 12:39 ` Loic Poulain
2026-07-08 15:15 ` Vikram Sharma
2026-07-08 21:32 ` Bryan O'Donoghue
2026-07-08 0:06 ` [PATCH v12 3/6] media: qcom: camss: Add support to populate sub-devices Bryan O'Donoghue
2026-07-08 0:18 ` sashiko-bot [this message]
2026-07-08 0:06 ` [PATCH v12 4/6] media: qcom: camss: Add legacy_phy flag to SoC definition structures Bryan O'Donoghue
2026-07-08 0:14 ` sashiko-bot
2026-07-08 0:16 ` Bryan O'Donoghue
2026-07-08 0:06 ` [PATCH v12 5/6] media: qcom: camss: Add support for PHY API devices Bryan O'Donoghue
2026-07-08 0:19 ` sashiko-bot
2026-07-08 0:07 ` [PATCH v12 6/6] media: qcom: camss: Drop legacy PHY descriptions from x1e Bryan O'Donoghue
2026-07-08 0:26 ` sashiko-bot
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=20260708001848.DE5EC1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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