diff options
author | Santosh Sivaraj <santosh@fossix.org> | 2017-06-27 12:30:05 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-06-28 13:08:16 +1000 |
commit | f8d0d5dc641cd405ad40cb2498b04df9716baee6 (patch) | |
tree | 4a3577149617c81530a5527e37414bf6017d9188 /arch/powerpc/platforms/pseries/smp.c | |
parent | adeb8667eaf5f00b5a7f0cede680cda078e8424b (diff) | |
download | linux-stable-f8d0d5dc641cd405ad40cb2498b04df9716baee6.tar.gz linux-stable-f8d0d5dc641cd405ad40cb2498b04df9716baee6.tar.bz2 linux-stable-f8d0d5dc641cd405ad40cb2498b04df9716baee6.zip |
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/pseries/smp.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/smp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 52ca6b311d44..c82182ac40af 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c @@ -151,7 +151,8 @@ static void smp_setup_cpu(int cpu) static int smp_pSeries_kick_cpu(int nr) { - BUG_ON(nr < 0 || nr >= NR_CPUS); + if (nr < 0 || nr >= NR_CPUS) + return -EINVAL; if (!smp_startup_cpu(nr)) return -ENOENT; |