Skip to contentSkip to conversation

wl1271: fix notifier interface supported test

PATCH In review Dan Carpenter 2 participants 2 messages May 8, 2010 – May 11, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 8/9 wl1271: fix notifier interface supported test

The "(wl == NULL)" test doesn't work here because "wl" is always non-null. The intent of the code is to return if the interface was not supported by the driver.

drivers/net/wireless/wl12xx/wl1271_main.c +1 -1
index b61cd10..55aa813 100644
@@ -852,7 +852,7 @@ static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
 		if (wl == wl_temp)
 			break;
 	}
-	if (wl == NULL)
+	if (wl != wl_temp)
 		return NOTIFY_DONE;
 
 	/* Get the interface IP address for the device. "ifa" will become
Acked-by on v1 8/9
#1 lore raw
Quoted 11 lines · ext Dan Carpenter

The "(wl == NULL)" test doesn't work here because "wl" is always non-null. The intent of the code is to return if the interface was not supported by the driver.

drivers/net/wireless/wl12xx/wl1271_main.c +0 -0
index b61cd10..55aa813 100644

drivers/net/wireless/wl12xx/wl1271_main.c static int wl1271_dev_notify(struct notifier_block *me, unsigned long what, · line 858

Quoted 8 lines
drivers/net/wireless/wl12xx/wl1271_main.c +1 -1
@@ -852,7 +852,7 @@ static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
 		if (wl == wl_temp)
 			break;
 	}
-	if (wl == NULL)
+	if (wl != wl_temp)
 		return NOTIFY_DONE;
 
 	/* Get the interface IP address for the device. "ifa" will become

Thanks for the fix.

Signature · 2 lines
Cheers,
Luca.