+ eisa-tidy-up-driver_register-return-value.patch added to -mm tree
A message that is not in the archive (sent off-list or not yet received): [email protected]
On Thu, Mar 02, 2006 at 03:49:10PM -0800, [email protected] wrote:
...
Quoted 10 lines
From: Bjorn Helgaas <[email protected]>
Remove the assumption that
driver_register()returns the number of devices bound to the driver. In fact, it returns zero for success or a negative error value.Signed-off-by Bjorn Helgaas <[email protected]>Cc Jeff Garzik <[email protected]>Signed-off-by Andrew Morton <[email protected]>
...
Quoted 6 lines
diff -puN
drivers/net/3c59x.c~eisa-tidy-up-driver_register-return-valuedrivers/net/3c59x.cdrivers/net/3c59x.c renamed from drivers/net/3c59x.c~eisa-tidy-up-driver_register-return-value +0
-0@@ -1094,9 +1094,11 @@ static int __init vortex_eisa_init (void {int eisa_found =0 ;
drivers/net/3c59x.c static int __init vortex_eisa_init (void · line 1104
Quoted 10 lines
drivers/net/3c59x.c renamed from drivers/net/3c59x.c~eisa-tidy-up-driver_register-return-value +3
-1int orig_cards_found = vortex_cards_found; +int err;#ifdef CONFIG_EISA -if (eisa_driver_register (&vortex_eisa_driver) >=0 ) { + err =eisa_driver_register (&vortex_eisa_driver); +if (!err) {/* Because of the way EISA bus is probed, we cannot assume * any device have been found when we exit from * eisa_driver_register (the bus root driver may not be
This results in
drivers/net/3c59x.c: In function `vortex_eisa_init':drivers/net/3c59x.c:1091: warning: unused variable `err'
if CONFIG_EISA is not defined.