* [PATCH] ipmi: Check the return status of open firmware device registration
@ 2010-07-27 14:07 Matthew Garrett
0 siblings, 0 replies; only message in thread
From: Matthew Garrett @ 2010-07-27 14:07 UTC (permalink / raw)
To: linux-kernel; +Cc: Matthew Garrett, Corey Minyard
If the registration of the Open Firmware IPMI device fails then we may
attempt to unregister a device that doesn't exist. Check the return code.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Corey Minyard <cminyard@mvista.com>
---
drivers/char/ipmi/ipmi_si_intf.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 094bdc3..e39a744 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -3337,8 +3337,11 @@ static __devinit int init_ipmi_si(void)
#endif
#ifdef CONFIG_PPC_OF
- of_register_platform_driver(&ipmi_of_platform_driver);
- of_registered = 1;
+ rv = of_register_platform_driver(&ipmi_of_platform_driver);
+ if (rv)
+ printk(KERN_ERR PFX "Unable to register OF driver: %d\n", rv);
+ else
+ of_registered = 1;
#endif
/* We prefer devices with interrupts, but in the case of a machine
--
1.7.1.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-27 14:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-27 14:07 [PATCH] ipmi: Check the return status of open firmware device registration Matthew Garrett
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®