提交 c1cc53be 编写于 作者: A Antonino A. Daplas 提交者: Linus Torvalds

[PATCH] atyfb: Honor the return value of pci_register_driver

Check return value of pci_register_driver().
Signed-off-by: NAntonino Daplas <adaplas@pol.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 0a727dea
...@@ -3863,6 +3863,7 @@ static int __devinit atyfb_setup(char *options) ...@@ -3863,6 +3863,7 @@ static int __devinit atyfb_setup(char *options)
static int __devinit atyfb_init(void) static int __devinit atyfb_init(void)
{ {
int err1 = 1, err2 = 1;
#ifndef MODULE #ifndef MODULE
char *option = NULL; char *option = NULL;
...@@ -3872,12 +3873,13 @@ static int __devinit atyfb_init(void) ...@@ -3872,12 +3873,13 @@ static int __devinit atyfb_init(void)
#endif #endif
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
pci_register_driver(&atyfb_driver); err1 = pci_register_driver(&atyfb_driver);
#endif #endif
#ifdef CONFIG_ATARI #ifdef CONFIG_ATARI
atyfb_atari_probe(); err2 = atyfb_atari_probe();
#endif #endif
return 0;
return (err1 && err2) ? -ENODEV : 0;
} }
static void __exit atyfb_exit(void) static void __exit atyfb_exit(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册