summaryrefslogtreecommitdiff
path: root/drivers/video/matrox
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2006-10-03 01:14:52 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 08:04:10 -0700
commitb0b10324b85d0379a2eec4984e77b25299a97ed4 (patch)
tree48366a3fa28aa30620fa34e8ea4fe70bf18b8a6c /drivers/video/matrox
parentc1cc53be0fc112cc8cb21ac4e0ab1af0a4082943 (diff)
[PATCH] matroxfb: Honor the return value of pci_register_driver
Check the 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/matrox')
-rw-r--r--drivers/video/matrox/matroxfb_base.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index 4a57dabb77d4..7acf01c181ee 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -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();
- pci_register_driver(&matroxfb_driver);
+ err = pci_register_driver(&matroxfb_driver);
dev = -1; /* accept all new devices... */
+ return err;
}
/* **************************** exit-time only **************************** */
@@ -2437,6 +2440,7 @@ static int __initdata initialized = 0;
static int __init matroxfb_init(void)
{
char *option = NULL;
+ int err = 0;
DBG(__FUNCTION__)
@@ -2448,11 +2452,11 @@ static int __init matroxfb_init(void)
return -ENXIO;
if (!initialized) {
initialized = 1;
- matrox_init();
+ err = matrox_init();
}
hotplug = 1;
/* never return failure, user can hotplug matrox later... */
- return 0;
+ return err;
}
module_init(matroxfb_init);