diff options
| author | Julia Lawall <Julia.Lawall@lip6.fr> | 2014-08-08 06:07:44 -0400 |
|---|---|---|
| committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-11-09 17:59:34 -0500 |
| commit | 0f9da5cb746581ae2de120c78a8afe29fb594fe4 (patch) | |
| tree | 5891cd0e09aef023ab5c4158345213fff1d1bae5 /arch/powerpc/sysdev | |
| parent | 20f1aae6cb0120fa54c0fe81614f6983df3b420a (diff) | |
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: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/sysdev')
| -rw-r--r-- | arch/powerpc/sysdev/ppc4xx_cpm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/sysdev/ppc4xx_cpm.c b/arch/powerpc/sysdev/ppc4xx_cpm.c index 82e2cfe35c62..ba95adf81d8d 100644 --- a/arch/powerpc/sysdev/ppc4xx_cpm.c +++ b/arch/powerpc/sysdev/ppc4xx_cpm.c | |||
| @@ -281,7 +281,7 @@ static int __init cpm_init(void) | |||
| 281 | printk(KERN_ERR "cpm: could not parse dcr property for %s\n", | 281 | printk(KERN_ERR "cpm: could not parse dcr property for %s\n", |
| 282 | np->full_name); | 282 | np->full_name); |
| 283 | ret = -EINVAL; | 283 | ret = -EINVAL; |
| 284 | goto out; | 284 | goto node_put; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | cpm.dcr_host = dcr_map(np, dcr_base, dcr_len); | 287 | cpm.dcr_host = dcr_map(np, dcr_base, dcr_len); |
| @@ -290,7 +290,7 @@ static int __init cpm_init(void) | |||
| 290 | printk(KERN_ERR "cpm: failed to map dcr property for %s\n", | 290 | printk(KERN_ERR "cpm: failed to map dcr property for %s\n", |
| 291 | np->full_name); | 291 | np->full_name); |
| 292 | ret = -EINVAL; | 292 | ret = -EINVAL; |
| 293 | goto out; | 293 | goto node_put; |
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | /* All 4xx SoCs with a CPM controller have one of two | 296 | /* All 4xx SoCs with a CPM controller have one of two |
| @@ -330,9 +330,9 @@ static int __init cpm_init(void) | |||
| 330 | 330 | ||
| 331 | if (cpm.standby || cpm.suspend) | 331 | if (cpm.standby || cpm.suspend) |
| 332 | suspend_set_ops(&cpm_suspend_ops); | 332 | suspend_set_ops(&cpm_suspend_ops); |
| 333 | node_put: | ||
| 334 | of_node_put(np); | ||
| 333 | out: | 335 | out: |
| 334 | if (np) | ||
| 335 | of_node_put(np); | ||
| 336 | return ret; | 336 | return ret; |
| 337 | } | 337 | } |
| 338 | 338 | ||
