Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Atanas Filipov" <atanas.filipov@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v1 2/3] interconnect: qcom: Add CAMNOC interconnect provider driver
Date: Fri, 07 Aug 2026 12:03:20 +0000	[thread overview]
Message-ID: <20260807120321.5C5B11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260807114951.4164439-3-atanas.filipov@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Missing return value check for `icc_link_nodes()`.
--

--- Patch [2]: [PATCH v1 2/3] interconnect: qcom: Add CAMNOC interconnect provider driver ---
commit 210368acb417d0d403f4fd95176e70d2684711b8
Author: Atanas Filipov <atanas.filipov@oss.qualcomm.com>
interconnect: qcom: Add CAMNOC interconnect provider driver

This commit introduces a new interconnect provider driver for the Qualcomm
Camera NOC (CAMNOC). It aggregates bandwidth requests from camera
sub-devices and adjusts the CAMNOC AXI clock rate to prevent a
last-writer-wins race condition.

> diff --git a/drivers/interconnect/qcom/qcom-camnoc.c b/drivers/interconnect/qcom/qcom-camnoc.c
> new file mode 100644
> index 0000000000000..a5a4844915153
> --- /dev/null
> +++ b/drivers/interconnect/qcom/qcom-camnoc.c

[ ... ]

> +static int qcom_camnoc_probe(struct platform_device *pdev)
> +{

[ ... ]

> +	for (i = 0; i < CAMNOC_NUM_NODES; i++) {
> +		node = icc_node_create_dyn();
> +		if (IS_ERR(node)) {
> +			ret = PTR_ERR(node);
> +			goto err_remove;
> +		}
> +
> +		ret = icc_node_set_name(node, provider, camnoc_nodes[i]->name);
> +		if (ret) {
> +			icc_node_destroy(node->id);
> +			goto err_remove;
> +		}
> +
> +		node->data = (void *)camnoc_nodes[i];
> +		icc_node_add(node, provider);
> +		data->nodes[i] = node;
> +	}
> +
> +	icc_link_nodes(data->nodes[MASTER_CAMNOC_JPEG],
> +		       &data->nodes[SLAVE_CAMNOC_AXI]);
> +
> +	ret = icc_provider_register(provider);

[Severity: High]
Does this code need to check the return value of icc_link_nodes?

If the internal memory allocation in icc_link_nodes fails, it returns an
error code (such as -ENOMEM) and the interconnect link is not created.

Because the error is ignored, the driver will continue and register the
provider successfully despite being broken. Later, when consumers request a
path through this interconnect, the path lookup will fail with -ENOENT,
potentially causing consumer drivers to malfunction or fail to probe.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260807114951.4164439-1-atanas.filipov@oss.qualcomm.com?part=2

  reply	other threads:[~2026-08-07 12:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 11:49 [PATCH v1 0/3] Add Qualcomm CAMNOC ICC provider Atanas Filipov
2026-08-07 11:49 ` [PATCH v1 1/3] dt-bindings: interconnect: Add Qualcomm CAMNOC ICC binding Atanas Filipov
2026-08-07 21:12   ` Dmitry Baryshkov
2026-08-07 11:49 ` [PATCH v1 2/3] interconnect: qcom: Add CAMNOC interconnect provider driver Atanas Filipov
2026-08-07 12:03   ` sashiko-bot [this message]
2026-08-07 11:49 ` [PATCH v1 3/3] arm64: dts: qcom: sm8250: Add CAMNOC ICC provider node Atanas Filipov

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=20260807120321.5C5B11F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=atanas.filipov@oss.qualcomm.com \
    --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