Commit 35a4f782 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Greg Kroah-Hartman

remoteproc: imx_rproc: Fix an error handling path in 'imx_rproc_probe()'

[ Upstream commit de6f83f8 ]

If 'of_device_get_match_data()' fails, we must undo the previous
'rproc_alloc()' call.

Fixes: a0ff4aa6 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4a092479
......@@ -339,8 +339,10 @@ static int imx_rproc_probe(struct platform_device *pdev)
}
dcfg = of_device_get_match_data(dev);
if (!dcfg)
return -EINVAL;
if (!dcfg) {
ret = -EINVAL;
goto err_put_rproc;
}
priv = rproc->priv;
priv->rproc = rproc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment