mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -mm] acpi: handle firmware_register init errors
@ 2006-07-12  5:47 Randy.Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2006-07-12  5:47 UTC (permalink / raw)
  To: lkml, linux-acpi; +Cc: len.brown, akpm

From: Randy Dunlap <rdunlap@xenotime.net>

Check and handle init errors.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 drivers/acpi/bus.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

--- linux-2618-rc1mm1.orig/drivers/acpi/bus.c
+++ linux-2618-rc1mm1/drivers/acpi/bus.c
@@ -25,6 +25,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
+#include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/sched.h>
 #include <linux/pm.h>
@@ -738,7 +739,10 @@ static int __init acpi_init(void)
 		return -ENODEV;
 	}
 
-	firmware_register(&acpi_subsys);
+	result = firmware_register(&acpi_subsys);
+	if (result < 0)
+		printk(KERN_WARNING "%s: firmware_register error: %d\n",
+			__FUNCTION__, result);
 
 	result = acpi_bus_init();
 


---

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH -mm] acpi: handle firmware_register init errors
@ 2006-07-12  6:03 Brown, Len
  0 siblings, 0 replies; 2+ messages in thread
From: Brown, Len @ 2006-07-12  6:03 UTC (permalink / raw)
  To: Randy.Dunlap, lkml, linux-acpi; +Cc: akpm

This is syntatically correct, and I'll apply it.

For this to actually trigger, it appears that create_dir()
would have to fail, which is hard to imagine.

One might question the value of /sys/firmware/acpi based
on the fact that the only thing we do differently if we
can't create it is print a message...

-Len


>-----Original Message-----
>From: Randy.Dunlap [mailto:rdunlap@xenotime.net] 
>Sent: Wednesday, July 12, 2006 1:47 AM
>To: lkml; linux-acpi@vger.kernel.org
>Cc: Brown, Len; akpm
>Subject: [PATCH -mm] acpi: handle firmware_register init errors
>
>From: Randy Dunlap <rdunlap@xenotime.net>
>
>Check and handle init errors.
>
>Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
>---
> drivers/acpi/bus.c |    6 +++++-
> 1 files changed, 5 insertions(+), 1 deletion(-)
>
>--- linux-2618-rc1mm1.orig/drivers/acpi/bus.c
>+++ linux-2618-rc1mm1/drivers/acpi/bus.c
>@@ -25,6 +25,7 @@
> #include <linux/module.h>
> #include <linux/init.h>
> #include <linux/ioport.h>
>+#include <linux/kernel.h>
> #include <linux/list.h>
> #include <linux/sched.h>
> #include <linux/pm.h>
>@@ -738,7 +739,10 @@ static int __init acpi_init(void)
> 		return -ENODEV;
> 	}
> 
>-	firmware_register(&acpi_subsys);
>+	result = firmware_register(&acpi_subsys);
>+	if (result < 0)
>+		printk(KERN_WARNING "%s: firmware_register error: %d\n",
>+			__FUNCTION__, result);
> 
> 	result = acpi_bus_init();
> 
>
>
>---
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-12  6:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-12  5:47 [PATCH -mm] acpi: handle firmware_register init errors Randy.Dunlap
2006-07-12  6:03 Brown, Len

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®