All of lore.kernel.org
 help / color / mirror / Atom feed
* small cleanups
@ 2008-02-04 21:00 Pavel Machek
  0 siblings, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2008-02-04 21:00 UTC (permalink / raw)
  To: kernel list, Trivial patch monkey

These are small cleanups all over the tree. Please apply,

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/fs/select.c b/fs/select.c
index 47f4792..c414aed 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -260,7 +260,7 @@ int do_select(int n, fd_set_bits *fds, s
 		wait = NULL;
 		if (retval || !*timeout || signal_pending(current))
 			break;
-		if(table.error) {
+		if (table.error) {
 			retval = table.error;
 			break;
 		}
diff --git a/kernel/signal.c b/kernel/signal.c
index 4333b6d..107618c 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -220,7 +220,7 @@ void flush_signals(struct task_struct *t
 	unsigned long flags;
 
 	spin_lock_irqsave(&t->sighand->siglock, flags);
-	clear_tsk_thread_flag(t,TIF_SIGPENDING);
+	clear_tsk_thread_flag(t, TIF_SIGPENDING);
 	flush_sigqueue(&t->pending);
 	flush_sigqueue(&t->signal->shared_pending);
 	spin_unlock_irqrestore(&t->sighand->siglock, flags);
@@ -424,7 +424,7 @@ int dequeue_signal(struct task_struct *t
 	}
 	if (signr &&
 	     ((info->si_code & __SI_MASK) == __SI_TIMER) &&
-	     info->si_sys_private){
+	     info->si_sys_private) {
 		/*
 		 * Release the siglock to ensure proper locking order
 		 * of timer locks outside of siglocks.  Note, we leave
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 51b5ee5..b376190 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -136,8 +136,7 @@ static void restart_machine(void)
 	preempt_enable_no_resched();
 }
 
-struct stop_machine_data
-{
+struct stop_machine_data {
 	int (*fn)(void *);
 	void *data;
 	struct completion done;
diff --git a/mm/pdflush.c b/mm/pdflush.c
index 8f6ee07..3931f71 100644
--- a/mm/pdflush.c
+++ b/mm/pdflush.c
@@ -17,8 +17,8 @@ #include <linux/spinlock.h>
 #include <linux/gfp.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/fs.h>		// Needed by writeback.h
-#include <linux/writeback.h>	// Prototypes pdflush_operation()
+#include <linux/fs.h>		/* Needed by writeback.h	  */
+#include <linux/writeback.h>	/* Prototypes pdflush_operation() */
 #include <linux/kthread.h>
 #include <linux/cpuset.h>
 #include <linux/freezer.h>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Small cleanups
@ 2008-06-25 10:25 ` Pavel Machek
  0 siblings, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2008-06-25 10:25 UTC (permalink / raw)
  To: kernel list, jirislaby, linux-wireless, ath5k-devel, linville


Small whitespace cleanups for wireless drivers

Signed-off-by: Pavel Machek <pavel@suse.cz>

---
commit ac537c3b8a8dda4adcbf7810c4b86474e054f48c
tree d638e3fbcb6d6c35109661f908d84cb81df95322
parent 7f80fda409c75b32b46a06b371fe504805188395
author Pavel <pavel@amd.ucw.cz> Wed, 25 Jun 2008 12:23:00 +0200
committer Pavel <pavel@amd.ucw.cz> Wed, 25 Jun 2008 12:23:00 +0200

 drivers/net/wireless/airo.c     |   41 +++++++++++++++++----------------------
 drivers/net/wireless/ath5k/hw.c |    4 ++--
 2 files changed, 20 insertions(+), 25 deletions(-)

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
@@ -85,10 +85,10 @@ #endif /* CONFIG_PCI */
 
 /* Include Wireless Extension definition and check version - Jean II */
 #include <linux/wireless.h>
-#define WIRELESS_SPY		// enable iwspy support
-#include <net/iw_handler.h>	// New driver API
+#define WIRELESS_SPY		/* enable iwspy support */
+#include <net/iw_handler.h>	/* New driver API */
 
-#define CISCO_EXT		// enable Cisco extensions
+#define CISCO_EXT		/* enable Cisco extensions */
 #ifdef CISCO_EXT
 #include <linux/delay.h>
 #endif
@@ -281,7 +281,7 @@ MODULE_PARM_DESC(proc_perm, "The permiss
 /* This is a kind of sloppy hack to get this information to OUT4500 and
    IN4500.  I would be extremely interested in the situation where this
    doesn't work though!!! */
-static int do8bitIO = 0;
+static int do8bitIO /* = 0 */;
 
 /* Return codes */
 #define SUCCESS 0
@@ -398,8 +398,8 @@ #define RIDSIZE 2048
 #define MAXTXQ 64
 
 /* BAP selectors */
-#define BAP0 0 // Used for receiving packets
-#define BAP1 2 // Used for xmiting packets and working with RIDS
+#define BAP0 0 /* Used for receiving packets */
+#define BAP1 2 /* Used for xmiting packets and working with RIDS */
 
 /* Flags */
 #define COMMAND_BUSY 0x8000
@@ -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;
 	readAPListRid(ai, ai->APList);
 	readSsidRid(ai, ai->SSID);
@@ -5545,7 +5547,7 @@ static int airo_pci_suspend(struct pci_d
 	disable_MAC(ai, 0);
 	netif_device_detach(dev);
 	ai->power = state;
-	cmd.cmd=HOSTSLEEP;
+	cmd.cmd = HOSTSLEEP;
 	issuecommand(ai, &cmd, &rsp);
 
 	pci_enable_wake(pdev, pci_choose_state(pdev, state), 1);
@@ -5575,7 +5577,7 @@ static int airo_pci_resume(struct pci_de
 		msleep(100);
 	}
 
-	set_bit (FLAG_COMMIT, &ai->flags);
+	set_bit(FLAG_COMMIT, &ai->flags);
 	disable_MAC(ai, 0);
         msleep(200);
 	if (ai->SSID) {
@@ -5602,9 +5604,6 @@ #endif
 static int __init airo_init_module( void )
 {
 	int i;
-#if 0
-	int have_isa_dev = 0;
-#endif
 
 	airo_entry = create_proc_entry("driver/aironet",
 				       S_IFDIR | airo_perm,
@@ -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
 	}
 
 #ifdef CONFIG_PCI
@@ -5669,7 +5664,7 @@ #endif
 
 static u8 airo_rssi_to_dbm (tdsRssiEntry *rssi_rid, u8 rssi)
 {
-	if( !rssi_rid )
+	if (!rssi_rid)
 		return 0;
 
 	return (0x100 - rssi_rid[rssi].rssidBm);
@@ -5679,10 +5674,10 @@ static u8 airo_dbm_to_pct (tdsRssiEntry 
 {
 	int i;
 
-	if( !rssi_rid )
+	if (!rssi_rid)
 		return 0;
 
-	for( i = 0; i < 256; i++ )
+	for (i = 0; i < 256; i++)
 		if (rssi_rid[i].rssidBm == dbm)
 			return rssi_rid[i].rssipct;
 
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 77990b5..c6d12c5 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -31,14 +31,14 @@ #include "reg.h"
 #include "base.h"
 #include "debug.h"
 
-/*Rate tables*/
+/* Rate tables */
 static const struct ath5k_rate_table ath5k_rt_11a = AR5K_RATES_11A;
 static const struct ath5k_rate_table ath5k_rt_11b = AR5K_RATES_11B;
 static const struct ath5k_rate_table ath5k_rt_11g = AR5K_RATES_11G;
 static const struct ath5k_rate_table ath5k_rt_turbo = AR5K_RATES_TURBO;
 static const struct ath5k_rate_table ath5k_rt_xr = AR5K_RATES_XR;
 
-/*Prototypes*/
+/* Prototypes */
 static int ath5k_hw_nic_reset(struct ath5k_hw *, u32);
 static int ath5k_hw_nic_wakeup(struct ath5k_hw *, int, bool);
 static int ath5k_hw_setup_4word_tx_desc(struct ath5k_hw *, struct ath5k_desc *,

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Small cleanups
@ 2008-06-25 10:25 ` Pavel Machek
  0 siblings, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2008-06-25 10:25 UTC (permalink / raw)
  To: kernel list, jirislaby, linux-wireless, ath5k-devel, linville


Small whitespace cleanups for wireless drivers

Signed-off-by: Pavel Machek <pavel@suse.cz>

---
commit ac537c3b8a8dda4adcbf7810c4b86474e054f48c
tree d638e3fbcb6d6c35109661f908d84cb81df95322
parent 7f80fda409c75b32b46a06b371fe504805188395
author Pavel <pavel@amd.ucw.cz> Wed, 25 Jun 2008 12:23:00 +0200
committer Pavel <pavel@amd.ucw.cz> Wed, 25 Jun 2008 12:23:00 +0200

 drivers/net/wireless/airo.c     |   41 +++++++++++++++++----------------------
 drivers/net/wireless/ath5k/hw.c |    4 ++--
 2 files changed, 20 insertions(+), 25 deletions(-)

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
@@ -85,10 +85,10 @@ #endif /* CONFIG_PCI */
 
 /* Include Wireless Extension definition and check version - Jean II */
 #include <linux/wireless.h>
-#define WIRELESS_SPY		// enable iwspy support
-#include <net/iw_handler.h>	// New driver API
+#define WIRELESS_SPY		/* enable iwspy support */
+#include <net/iw_handler.h>	/* New driver API */
 
-#define CISCO_EXT		// enable Cisco extensions
+#define CISCO_EXT		/* enable Cisco extensions */
 #ifdef CISCO_EXT
 #include <linux/delay.h>
 #endif
@@ -281,7 +281,7 @@ MODULE_PARM_DESC(proc_perm, "The permiss
 /* This is a kind of sloppy hack to get this information to OUT4500 and
    IN4500.  I would be extremely interested in the situation where this
    doesn't work though!!! */
-static int do8bitIO = 0;
+static int do8bitIO /* = 0 */;
 
 /* Return codes */
 #define SUCCESS 0
@@ -398,8 +398,8 @@ #define RIDSIZE 2048
 #define MAXTXQ 64
 
 /* BAP selectors */
-#define BAP0 0 // Used for receiving packets
-#define BAP1 2 // Used for xmiting packets and working with RIDS
+#define BAP0 0 /* Used for receiving packets */
+#define BAP1 2 /* Used for xmiting packets and working with RIDS */
 
 /* Flags */
 #define COMMAND_BUSY 0x8000
@@ -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;
 	readAPListRid(ai, ai->APList);
 	readSsidRid(ai, ai->SSID);
@@ -5545,7 +5547,7 @@ static int airo_pci_suspend(struct pci_d
 	disable_MAC(ai, 0);
 	netif_device_detach(dev);
 	ai->power = state;
-	cmd.cmd=HOSTSLEEP;
+	cmd.cmd = HOSTSLEEP;
 	issuecommand(ai, &cmd, &rsp);
 
 	pci_enable_wake(pdev, pci_choose_state(pdev, state), 1);
@@ -5575,7 +5577,7 @@ static int airo_pci_resume(struct pci_de
 		msleep(100);
 	}
 
-	set_bit (FLAG_COMMIT, &ai->flags);
+	set_bit(FLAG_COMMIT, &ai->flags);
 	disable_MAC(ai, 0);
         msleep(200);
 	if (ai->SSID) {
@@ -5602,9 +5604,6 @@ #endif
 static int __init airo_init_module( void )
 {
 	int i;
-#if 0
-	int have_isa_dev = 0;
-#endif
 
 	airo_entry = create_proc_entry("driver/aironet",
 				       S_IFDIR | airo_perm,
@@ -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
 	}
 
 #ifdef CONFIG_PCI
@@ -5669,7 +5664,7 @@ #endif
 
 static u8 airo_rssi_to_dbm (tdsRssiEntry *rssi_rid, u8 rssi)
 {
-	if( !rssi_rid )
+	if (!rssi_rid)
 		return 0;
 
 	return (0x100 - rssi_rid[rssi].rssidBm);
@@ -5679,10 +5674,10 @@ static u8 airo_dbm_to_pct (tdsRssiEntry 
 {
 	int i;
 
-	if( !rssi_rid )
+	if (!rssi_rid)
 		return 0;
 
-	for( i = 0; i < 256; i++ )
+	for (i = 0; i < 256; i++)
 		if (rssi_rid[i].rssidBm == dbm)
 			return rssi_rid[i].rssipct;
 
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 77990b5..c6d12c5 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -31,14 +31,14 @@ #include "reg.h"
 #include "base.h"
 #include "debug.h"
 
-/*Rate tables*/
+/* Rate tables */
 static const struct ath5k_rate_table ath5k_rt_11a = AR5K_RATES_11A;
 static const struct ath5k_rate_table ath5k_rt_11b = AR5K_RATES_11B;
 static const struct ath5k_rate_table ath5k_rt_11g = AR5K_RATES_11G;
 static const struct ath5k_rate_table ath5k_rt_turbo = AR5K_RATES_TURBO;
 static const struct ath5k_rate_table ath5k_rt_xr = AR5K_RATES_XR;
 
-/*Prototypes*/
+/* Prototypes */
 static int ath5k_hw_nic_reset(struct ath5k_hw *, u32);
 static int ath5k_hw_nic_wakeup(struct ath5k_hw *, int, bool);
 static int ath5k_hw_setup_4word_tx_desc(struct ath5k_hw *, struct ath5k_desc *,

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Small cleanups
  2008-06-25 10:25 ` Pavel Machek
@ 2008-06-25 11:11   ` Jiri Slaby
  -1 siblings, 0 replies; 7+ messages in thread
From: Jiri Slaby @ 2008-06-25 11:11 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, linux-wireless, ath5k-devel, linville

Pavel Machek napsal(a):
> Small whitespace cleanups for wireless drivers
> 
> Signed-off-by: Pavel Machek <pavel@suse.cz>

The ath5k part
Acked-by: Jiri Slaby <jirislaby@gmail.com>

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Small cleanups
@ 2008-06-25 11:11   ` Jiri Slaby
  0 siblings, 0 replies; 7+ messages in thread
From: Jiri Slaby @ 2008-06-25 11:11 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, linux-wireless, ath5k-devel, linville

Pavel Machek napsal(a):
> Small whitespace cleanups for wireless drivers
> 
> Signed-off-by: Pavel Machek <pavel@suse.cz>

The ath5k part
Acked-by: Jiri Slaby <jirislaby@gmail.com>

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Small cleanups
  2008-06-25 11:11   ` Jiri Slaby
@ 2008-06-25 11:12     ` Jiri Slaby
  -1 siblings, 0 replies; 7+ messages in thread
From: Jiri Slaby @ 2008-06-25 11:12 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, linux-wireless, ath5k-devel, linville

>> -    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?

Sorry, ignore this.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Small cleanups
@ 2008-06-25 11:12     ` Jiri Slaby
  0 siblings, 0 replies; 7+ messages in thread
From: Jiri Slaby @ 2008-06-25 11:12 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, linux-wireless, ath5k-devel, linville

>> -    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?

Sorry, ignore this.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-06-25 11:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 10:25 Small cleanups Pavel Machek
2008-06-25 10:25 ` Pavel Machek
2008-06-25 11:11 ` Jiri Slaby
2008-06-25 11:11   ` Jiri Slaby
2008-06-25 11:12   ` Jiri Slaby
2008-06-25 11:12     ` Jiri Slaby
  -- strict thread matches above, loose matches on Subject: below --
2008-02-04 21:00 small cleanups Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.