Re: [PATCH 5/8] atyfb: Honor the return value of pci_register_driver
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2006-08-10 12:45:32
On Thu, 10 Aug 2006, Antonino A. Daplas wrote:
Check return value of pci_register_driver(). Signed-off-by: Antonino Daplas <redacted> --- Geert Uytterhoeven wrote:quoted
Actually it's a bit more complicated, as some Ataris do have PCI (although currently Atari Hades PCI support is broken).How about this?
Looks better.
quoted hunk ↗ jump to hunk
drivers/video/aty/atyfb_base.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 053ff63..3f1bdcd 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c@@ -3859,6 +3859,7 @@ #endif /* MODULE */ static int __devinit atyfb_init(void) { + int err = 0; #ifndef MODULE char *option = NULL;@@ -3868,12 +3869,14 @@ #ifndef MODULE #endif #ifdef CONFIG_PCI - pci_register_driver(&atyfb_driver); + err = pci_register_driver(&atyfb_driver); #endif #ifdef CONFIG_ATARI - atyfb_atari_probe(); + if (!err) + err = atyfb_atari_probe(); #endif - return 0; + + return err; } static void __exit atyfb_exit(void)
I guess pci_register_driver() failing is a fairly rare and catastrophical
event?
If not, atyfb_atari_probe() should probably continue if pci_register_driver()
failed.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642