Skip to content

Commit

Permalink
Merge tag 'icc-6.13-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/djakov/icc into char-misc-next

Georgi writes:

interconnect fixes for v6.13-rc

This contains two fixes. One fixing a boot error on db410c board when UBSAN
is enabled with clang-19 builds. The other one adds a missing return value
check after devm_kasprintf.

- interconnect: qcom: icc-rpm: Set the count member before accessing the flex array
- interconnect: icc-clk: check return values of devm_kasprintf()

Signed-off-by: Georgi Djakov <djakov@kernel.org>

* tag 'icc-6.13-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: icc-clk: check return values of devm_kasprintf()
  interconnect: qcom: icc-rpm: Set the count member before accessing the flex array
  • Loading branch information
Greg Kroah-Hartman committed Jan 2, 2025
2 parents e16ebd9 + 44c5aa7 commit 997bb2d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions drivers/interconnect/icc-clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ struct icc_provider *icc_clk_register(struct device *dev,
}

node->name = devm_kasprintf(dev, GFP_KERNEL, "%s_master", data[i].name);
if (!node->name) {
ret = -ENOMEM;
goto err;
}

node->data = &qp->clocks[i];
icc_node_add(node, provider);
/* link to the next node, slave */
Expand All @@ -129,6 +134,11 @@ struct icc_provider *icc_clk_register(struct device *dev,
}

node->name = devm_kasprintf(dev, GFP_KERNEL, "%s_slave", data[i].name);
if (!node->name) {
ret = -ENOMEM;
goto err;
}

/* no data for slave node */
icc_node_add(node, provider);
onecell->nodes[j++] = node;
Expand Down
2 changes: 1 addition & 1 deletion drivers/interconnect/qcom/icc-rpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ int qnoc_probe(struct platform_device *pdev)
GFP_KERNEL);
if (!data)
return -ENOMEM;
data->num_nodes = num_nodes;

qp->num_intf_clks = cd_num;
for (i = 0; i < cd_num; i++)
Expand Down Expand Up @@ -597,7 +598,6 @@ int qnoc_probe(struct platform_device *pdev)

data->nodes[i] = node;
}
data->num_nodes = num_nodes;

clk_bulk_disable_unprepare(qp->num_intf_clks, qp->intf_clks);

Expand Down

0 comments on commit 997bb2d

Please sign in to comment.