Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f9da5cb authored by Julia Lawall's avatar Julia Lawall Committed by Michael Ellerman
Browse files

powerpc/4xx/cpm: delete unneeded test before of_node_put



Simplify the error path to avoid calling of_node_put when it is not needed.

Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 20f1aae6
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -281,7 +281,7 @@ static int __init cpm_init(void)
		printk(KERN_ERR "cpm: could not parse dcr property for %s\n",
		       np->full_name);
		ret = -EINVAL;
		goto out;
		goto node_put;
	}

	cpm.dcr_host = dcr_map(np, dcr_base, dcr_len);
@@ -290,7 +290,7 @@ static int __init cpm_init(void)
		printk(KERN_ERR "cpm: failed to map dcr property for %s\n",
		       np->full_name);
		ret = -EINVAL;
		goto out;
		goto node_put;
	}

	/* All 4xx SoCs with a CPM controller have one of two
@@ -330,9 +330,9 @@ static int __init cpm_init(void)

	if (cpm.standby || cpm.suspend)
		suspend_set_ops(&cpm_suspend_ops);
out:
	if (np)
node_put:
	of_node_put(np);
out:
	return ret;
}