Commit a71c4a26 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] APM: handle kernel_thread failure

From: "Randy.Dunlap" <rddunlap@osdl.org>
From: Eugene TEO <eugeneteo@eugeneteo.net>
parent 41a0db27
......@@ -1891,6 +1891,7 @@ static struct miscdevice apm_device = {
static int __init apm_init(void)
{
struct proc_dir_entry *apm_proc;
int ret;
int i;
if (apm_info.bios.version == 0) {
......@@ -2008,7 +2009,11 @@ static int __init apm_init(void)
if (apm_proc)
apm_proc->owner = THIS_MODULE;
kernel_thread(apm, NULL, CLONE_KERNEL | SIGCHLD);
ret = kernel_thread(apm, NULL, CLONE_KERNEL | SIGCHLD);
if (ret < 0) {
printk(KERN_ERR "apm: disabled - Unable to start kernel thread.\n");
return -ENOMEM;
}
if (num_online_cpus() > 1 && !smp ) {
printk(KERN_NOTICE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment