summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powernv/smp.c
diff options
context:
space:
mode:
authorSantosh Sivaraj <santosh@fossix.org>2017-06-27 10:00:05 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2017-06-28 06:08:16 +0300
commitf8d0d5dc641cd405ad40cb2498b04df9716baee6 (patch)
tree4a3577149617c81530a5527e37414bf6017d9188 /arch/powerpc/platforms/powernv/smp.c
parentadeb8667eaf5f00b5a7f0cede680cda078e8424b (diff)
downloadlinux-f8d0d5dc641cd405ad40cb2498b04df9716baee6.tar.xz
powerpc/smp: Do not BUG_ON if invalid CPU during kick
During secondary start, we do not need to BUG_ON if an invalid CPU number is passed. We already print an error if secondary cannot be started, so just return an error instead. Signed-off-by: Santosh Sivaraj <santosh@fossix.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv/smp.c')
-rw-r--r--arch/powerpc/platforms/powernv/smp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index c04c87adad94..292825f25ffd 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -63,7 +63,8 @@ static int pnv_smp_kick_cpu(int nr)
long rc;
uint8_t status;
- BUG_ON(nr < 0 || nr >= NR_CPUS);
+ if (nr < 0 || nr >= NR_CPUS)
+ return -EINVAL;
/*
* If we already started or OPAL is not supported, we just