summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc/qcom_q6v5_mss.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2020-04-03 19:50:04 +0200
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-04-17 00:53:15 +0200
commit13c060b50a341dd60303e5264d12108b5747f200 (patch)
treeb0f84cd03c5baceaae0a92c7f4fdef63557439ed /drivers/remoteproc/qcom_q6v5_mss.c
parentLinux 5.7-rc1 (diff)
downloadlinux-13c060b50a341dd60303e5264d12108b5747f200.tar.xz
linux-13c060b50a341dd60303e5264d12108b5747f200.zip
remoteproc: qcom_q6v5_mss: fix a bug in q6v5_probe()
If looking up the DT "firmware-name" property fails in q6v6_probe(), the function returns without freeing the remoteproc structure that has been allocated. Fix this by jumping to the free_rproc label, which takes care of this. Signed-off-by: Alex Elder <elder@linaro.org> Link: https://lore.kernel.org/r/20200403175005.17130-3-elder@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/qcom_q6v5_mss.c')
-rw-r--r--drivers/remoteproc/qcom_q6v5_mss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index ce49c3236ff7..60cdf699ea80 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -1675,7 +1675,7 @@ static int q6v5_probe(struct platform_device *pdev)
ret = of_property_read_string_index(pdev->dev.of_node, "firmware-name",
1, &qproc->hexagon_mdt_image);
if (ret < 0 && ret != -EINVAL)
- return ret;
+ goto free_rproc;
platform_set_drvdata(pdev, qproc);