Skip to content

Commit 35a4f78

Browse files
tititiou36gregkh
authored andcommitted
remoteproc: imx_rproc: Fix an error handling path in 'imx_rproc_probe()'
[ Upstream commit de6f83f ] If 'of_device_get_match_data()' fails, we must undo the previous 'rproc_alloc()' call. Fixes: a0ff4aa ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4a09247 commit 35a4f78

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/remoteproc/imx_rproc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,10 @@ static int imx_rproc_probe(struct platform_device *pdev)
339339
}
340340

341341
dcfg = of_device_get_match_data(dev);
342-
if (!dcfg)
343-
return -EINVAL;
342+
if (!dcfg) {
343+
ret = -EINVAL;
344+
goto err_put_rproc;
345+
}
344346

345347
priv = rproc->priv;
346348
priv->rproc = rproc;

0 commit comments

Comments
 (0)