Commit 2bd5b559 authored by Jan Kiszka's avatar Jan Kiszka Committed by David S. Miller

net: ti: icssg-prueth: Fix error cleanup on failing pruss_request_mem_region

We were just continuing in this case, surely not desired.

Fixes: 128d5874 ("net: ti: icssg-prueth: Add ICSSG ethernet driver")
Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: default avatarRoger Quadros <rogerq@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e409d734
...@@ -2063,7 +2063,7 @@ static int prueth_probe(struct platform_device *pdev) ...@@ -2063,7 +2063,7 @@ static int prueth_probe(struct platform_device *pdev)
&prueth->shram); &prueth->shram);
if (ret) { if (ret) {
dev_err(dev, "unable to get PRUSS SHRD RAM2: %d\n", ret); dev_err(dev, "unable to get PRUSS SHRD RAM2: %d\n", ret);
pruss_put(prueth->pruss); goto put_pruss;
} }
prueth->sram_pool = of_gen_pool_get(np, "sram", 0); prueth->sram_pool = of_gen_pool_get(np, "sram", 0);
...@@ -2215,6 +2215,8 @@ static int prueth_probe(struct platform_device *pdev) ...@@ -2215,6 +2215,8 @@ static int prueth_probe(struct platform_device *pdev)
put_mem: put_mem:
pruss_release_mem_region(prueth->pruss, &prueth->shram); pruss_release_mem_region(prueth->pruss, &prueth->shram);
put_pruss:
pruss_put(prueth->pruss); pruss_put(prueth->pruss);
put_cores: put_cores:
......
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