Search Linux Wireless

Re: Small cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pavel Machek napsal(a):
Small whitespace cleanups for wireless drivers

Signed-off-by: Pavel Machek <pavel@xxxxxxx>

The ath5k part
Acked-by: Jiri Slaby <jirislaby@xxxxxxxxx>

Thanks!

diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 32019fb..329be62 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
[...]
@@ -5530,11 +5530,13 @@ static int airo_pci_suspend(struct pci_d
 	Cmd cmd;
 	Resp rsp;
- if ((ai->APList == NULL) &&
-		(ai->APList = kmalloc(sizeof(APListRid), GFP_KERNEL)) == NULL)
+	if (!ai->APList)
+		ai->APList = kmalloc(sizeof(APListRid), GFP_KERNEL);
+	if (!ai->APList)
 		return -ENOMEM;
-	if ((ai->SSID == NULL) &&
-		(ai->SSID = kmalloc(sizeof(SsidRid), GFP_KERNEL)) == NULL)
+	if (!ai->SSID)
+		ai->SSID = kmalloc(sizeof(SsidRid), GFP_KERNEL);
+	if (!ai->SSID)
 		return -ENOMEM;

Would you mind sending another patch which would fix the potential leak?

@@ -5615,15 +5614,11 @@ #endif
 		airo_entry->gid = proc_gid;
 	}
- for( i = 0; i < 4 && io[i] && irq[i]; i++ ) {
+	for (i = 0; i < 4 && io[i] && irq[i]; i++) {
 		airo_print_info("", "Trying to configure ISA adapter at irq=%d "
 			"io=0x%x", irq[i], io[i] );
 		if (init_airo_card( irq[i], io[i], 0, NULL ))
-#if 0
-			have_isa_dev = 1;
-#else
 			/* do nothing */ ;
-#endif

Why not just remove the if?

 	}
#ifdef CONFIG_PCI

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux