Skip to contentSkip to conversation

+ eisa-tidy-up-driver_register-return-value.patch added to -mm tree

DISCUSSION Steffen Klassert 1 participant 1 message Mar 11, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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.

...

Quoted 6 lines

diff -puN drivers/net/3c59x.c~eisa-tidy-up-driver_register-return-value drivers/net/3c59x.c

drivers/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 -1
 	int 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.