diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-03-16 15:10:35 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-03-16 15:10:35 -0800 |
| commit | 289b0e41fbcde9706029d39934c3f259d08eeeef (patch) | |
| tree | c5f5bdb167dd9e64b37ac6bb683a412e9e2b6b5b /drivers/block/cpqarray.c | |
| parent | 13034f8277dab8cedfd5044a6ecfbf49bed3edfd (diff) | |
[PATCH] cpqarray: check pci_register_driver() return value
From: <mikem@beardog.cca.cpqcorp.net>
* Examines rc of pci_register_driver and returns
Diffstat (limited to 'drivers/block/cpqarray.c')
| -rw-r--r-- | drivers/block/cpqarray.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index e8430512e101..5ee6b2e8061d 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c @@ -318,9 +318,7 @@ MODULE_PARM(eisa, "1-8i"); */ int __init cpqarray_init(void) { - if(cpqarray_init_step2() == 0) /* all the block dev num already used */ - return -ENODEV; /* or no controllers were found */ - return 0; + return (cpqarray_init_step2()); } static void release_io_mem(ctlr_info_t *c) @@ -559,18 +557,21 @@ static struct pci_driver cpqarray_pci_driver = { }; /* - * This is it. Find all the controllers and register them. I really hate - * stealing all these major device numbers. + * This is it. Find all the controllers and register them. * returns the number of block devices registered. */ int __init cpqarray_init_step2(void) { int num_cntlrs_reg = 0; int i; + int rc = 0; /* detect controllers */ printk(DRIVER_NAME "\n"); - pci_register_driver(&cpqarray_pci_driver); +/* TODO: If it's an eisa only system, will rc return negative? */ + rc = pci_register_driver(&cpqarray_pci_driver); + if (rc < 0) + return rc; cpqarray_eisa_detect(); for (i=0; i < MAX_CTLR; i++) { |
