mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 08:04:24 -04:00
Merge tag 'icc-5.4-rc5' of https://git.linaro.org/people/georgi.djakov/linux into char-misc-linus
Georgi writes: interconnect fixes for 5.4 Two tiny fixes for the current release: - Fix memory allocation size in a driver. - Add missing mutex. Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> * tag 'icc-5.4-rc5' of https://git.linaro.org/people/georgi.djakov/linux: interconnect: Add locking in icc_set_tag() interconnect: qcom: Fix icc_onecell_data allocation
This commit is contained in:
@@ -405,8 +405,12 @@ void icc_set_tag(struct icc_path *path, u32 tag)
|
||||
if (!path)
|
||||
return;
|
||||
|
||||
mutex_lock(&icc_lock);
|
||||
|
||||
for (i = 0; i < path->num_nodes; i++)
|
||||
path->reqs[i].tag = tag;
|
||||
|
||||
mutex_unlock(&icc_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(icc_set_tag);
|
||||
|
||||
|
||||
@@ -433,7 +433,8 @@ static int qnoc_probe(struct platform_device *pdev)
|
||||
if (!qp)
|
||||
return -ENOMEM;
|
||||
|
||||
data = devm_kcalloc(dev, num_nodes, sizeof(*node), GFP_KERNEL);
|
||||
data = devm_kzalloc(dev, struct_size(data, nodes, num_nodes),
|
||||
GFP_KERNEL);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -790,7 +790,8 @@ static int qnoc_probe(struct platform_device *pdev)
|
||||
if (!qp)
|
||||
return -ENOMEM;
|
||||
|
||||
data = devm_kcalloc(&pdev->dev, num_nodes, sizeof(*node), GFP_KERNEL);
|
||||
data = devm_kzalloc(&pdev->dev, struct_size(data, nodes, num_nodes),
|
||||
GFP_KERNEL);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user