mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
firmware: scmi: mailbox transport: fix probe failure implementation
Correct scmi mailbox probe function that can't free the scmi channel instance since its auto-allocated by the device model framework. Cc: Simon Glass <sjg@chromium.org> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
This commit is contained in:
parent
5ddbbd1957
commit
7b4993907a
1 changed files with 1 additions and 5 deletions
|
@ -72,17 +72,13 @@ int scmi_mbox_probe(struct udevice *dev)
|
||||||
ret = mbox_get_by_index(dev, 0, &chan->mbox);
|
ret = mbox_get_by_index(dev, 0, &chan->mbox);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "Failed to find mailbox: %d\n", ret);
|
dev_err(dev, "Failed to find mailbox: %d\n", ret);
|
||||||
goto out;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = scmi_dt_get_smt_buffer(dev, &chan->smt);
|
ret = scmi_dt_get_smt_buffer(dev, &chan->smt);
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_err(dev, "Failed to get shm resources: %d\n", ret);
|
dev_err(dev, "Failed to get shm resources: %d\n", ret);
|
||||||
|
|
||||||
out:
|
|
||||||
if (ret)
|
|
||||||
devm_kfree(dev, chan);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue