diff options
Diffstat (limited to 'arch/powerpc/kernel/sysfs.c')
| -rw-r--r-- | arch/powerpc/kernel/sysfs.c | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index defecb3b1b15..08d8072d6e7a 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c @@ -928,7 +928,8 @@ static int unregister_cpu_online(unsigned int cpu)  	struct device_attribute *attrs, *pmc_attrs;  	int i, nattrs; -	BUG_ON(!c->hotpluggable); +	if (WARN_RATELIMIT(!c->hotpluggable, "cpu %d can't be offlined\n", cpu)) +		return -EBUSY;  #ifdef CONFIG_PPC64  	if (cpu_has_feature(CPU_FTR_SMT)) |