Re: [PATCH -mm2] net: Fix compiler-error on dgrs.c when !CONFIG_PCI

From: Herbert Xu
Date: Sun Nov 20 2005 - 15:40:03 EST


On Sun, Nov 20, 2005 at 04:35:46PM +0100, Richard Knutsson wrote:
>
> >-#ifdef CONFIG_EISA
> >- cardcount = eisa_driver_register(&dgrs_eisa_driver);
> >+ cardcount = dgrs_register_eisa();
> > if (cardcount < 0)
> > return cardcount;
> >-#endif
> >- cardcount = pci_register_driver(&dgrs_pci_driver);
> >- if (cardcount)
> >+ cardcount = dgrs_register_pci();
> >+ if (cardcount < 0) {
> Are you sure it should be "cardcount < 0" and not "cardcount"?

Yes if cardcount is >= 0 then the registration was successful.

> >+ dgrs_unregister_eisa();
> Why change the behaviour off this driver?

Because the driver was buggy. When this function returns a non-zero
value, it must return the system to its original state.

That means if the EISA driver has already been registered then it must
be unregistered.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/