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

[PATCH] matroxfb: Honor the return value of pci_register_driver

Check the 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>
上级 c1cc53be
...@@ -2277,10 +2277,13 @@ static void __init matroxfb_init_params(void) { ...@@ -2277,10 +2277,13 @@ static void __init matroxfb_init_params(void) {
} }
} }
static void __init matrox_init(void) { static int __init matrox_init(void) {
int err;
matroxfb_init_params(); matroxfb_init_params();
pci_register_driver(&matroxfb_driver); err = pci_register_driver(&matroxfb_driver);
dev = -1; /* accept all new devices... */ dev = -1; /* accept all new devices... */
return err;
} }
/* **************************** exit-time only **************************** */ /* **************************** exit-time only **************************** */
...@@ -2437,6 +2440,7 @@ static int __initdata initialized = 0; ...@@ -2437,6 +2440,7 @@ static int __initdata initialized = 0;
static int __init matroxfb_init(void) static int __init matroxfb_init(void)
{ {
char *option = NULL; char *option = NULL;
int err = 0;
DBG(__FUNCTION__) DBG(__FUNCTION__)
...@@ -2448,11 +2452,11 @@ static int __init matroxfb_init(void) ...@@ -2448,11 +2452,11 @@ static int __init matroxfb_init(void)
return -ENXIO; return -ENXIO;
if (!initialized) { if (!initialized) {
initialized = 1; initialized = 1;
matrox_init(); err = matrox_init();
} }
hotplug = 1; hotplug = 1;
/* never return failure, user can hotplug matrox later... */ /* never return failure, user can hotplug matrox later... */
return 0; return err;
} }
module_init(matroxfb_init); module_init(matroxfb_init);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册