diff options
| -rw-r--r-- | arch/powerpc/platforms/pseries/dlpar.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index b4b11096ea8b..019d34aaf054 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c | |||
| @@ -412,6 +412,10 @@ static ssize_t dlpar_cpu_probe(const char *buf, size_t count) | |||
| 412 | if (rc) | 412 | if (rc) |
| 413 | return -EINVAL; | 413 | return -EINVAL; |
| 414 | 414 | ||
| 415 | rc = dlpar_acquire_drc(drc_index); | ||
| 416 | if (rc) | ||
| 417 | return -EINVAL; | ||
| 418 | |||
| 415 | parent = of_find_node_by_path("/cpus"); | 419 | parent = of_find_node_by_path("/cpus"); |
| 416 | if (!parent) | 420 | if (!parent) |
| 417 | return -ENODEV; | 421 | return -ENODEV; |
| @@ -422,12 +426,6 @@ static ssize_t dlpar_cpu_probe(const char *buf, size_t count) | |||
| 422 | 426 | ||
| 423 | of_node_put(parent); | 427 | of_node_put(parent); |
| 424 | 428 | ||
| 425 | rc = dlpar_acquire_drc(drc_index); | ||
| 426 | if (rc) { | ||
| 427 | dlpar_free_cc_nodes(dn); | ||
| 428 | return -EINVAL; | ||
| 429 | } | ||
| 430 | |||
| 431 | rc = dlpar_attach_node(dn); | 429 | rc = dlpar_attach_node(dn); |
| 432 | if (rc) { | 430 | if (rc) { |
| 433 | dlpar_release_drc(drc_index); | 431 | dlpar_release_drc(drc_index); |
