diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-10-03 01:14:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 08:04:10 -0700 |
commit | c1cc53be0fc112cc8cb21ac4e0ab1af0a4082943 (patch) | |
tree | 92c583d626cfb7ebab072c7fff72a2fa87a54fec /drivers/video | |
parent | 0a727dea774c47ad1e18907be33f12c9f325ee4a (diff) |
[PATCH] atyfb: Honor the return value of pci_register_driver
Check return value of pci_register_driver().
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 19a71f045784..1e8e9ade9396 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -3863,6 +3863,7 @@ static int __devinit atyfb_setup(char *options) static int __devinit atyfb_init(void) { + int err1 = 1, err2 = 1; #ifndef MODULE char *option = NULL; @@ -3872,12 +3873,13 @@ static int __devinit atyfb_init(void) #endif #ifdef CONFIG_PCI - pci_register_driver(&atyfb_driver); + err1 = pci_register_driver(&atyfb_driver); #endif #ifdef CONFIG_ATARI - atyfb_atari_probe(); + err2 = atyfb_atari_probe(); #endif - return 0; + + return (err1 && err2) ? -ENODEV : 0; } static void __exit atyfb_exit(void) |