All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] tty: ipwireless: Remove redundant NULL check before kfree
@ 2013-03-06 20:17 syamsidhardh
  2013-03-08 13:26 ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: syamsidhardh @ 2013-03-06 20:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: syamsidhardh, jslaby, gregkh, Syam Sidhardhan

From: Syam Sidhardhan <s.syam@samsung.com>

kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
v1 -> Corrected the from address.

 drivers/tty/ipwireless/hardware.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/ipwireless/hardware.c b/drivers/tty/ipwireless/hardware.c
index 97a511f..2c14842 100644
--- a/drivers/tty/ipwireless/hardware.c
+++ b/drivers/tty/ipwireless/hardware.c
@@ -1732,8 +1732,7 @@ void ipwireless_hardware_free(struct ipw_hardware *hw)
 	flush_work(&hw->work_rx);
 
 	for (i = 0; i < NL_NUM_OF_ADDRESSES; i++)
-		if (hw->packet_assembler[i] != NULL)
-			kfree(hw->packet_assembler[i]);
+		kfree(hw->packet_assembler[i]);
 
 	for (i = 0; i < NL_NUM_OF_PRIORITIES; i++)
 		list_for_each_entry_safe(tp, tq, &hw->tx_queue[i], queue) {
-- 
1.7.9.5


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

* Re: [PATCH v1] tty: ipwireless: Remove redundant NULL check before kfree
  2013-03-06 20:17 [PATCH v1] tty: ipwireless: Remove redundant NULL check before kfree syamsidhardh
@ 2013-03-08 13:26 ` Jiri Kosina
  2013-03-08 17:48   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Kosina @ 2013-03-08 13:26 UTC (permalink / raw)
  To: syamsidhardh; +Cc: linux-kernel, jslaby, gregkh, Syam Sidhardhan

On Thu, 7 Mar 2013, syamsidhardh@gmail.com wrote:

> From: Syam Sidhardhan <s.syam@samsung.com>
> 
> kfree on NULL pointer is a no-op.
> 
> Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>

With my ipwireless maintainer hat on:

	Acked-by: Jiri Kosina <jkosina@suse.cz>

Greg, could you please take it through tty tree?

Thanks,

-- 
Jiri Kosina
SUSE Labs


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

* Re: [PATCH v1] tty: ipwireless: Remove redundant NULL check before kfree
  2013-03-08 13:26 ` Jiri Kosina
@ 2013-03-08 17:48   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2013-03-08 17:48 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: syamsidhardh, linux-kernel, jslaby, Syam Sidhardhan

On Fri, Mar 08, 2013 at 02:26:43PM +0100, Jiri Kosina wrote:
> On Thu, 7 Mar 2013, syamsidhardh@gmail.com wrote:
> 
> > From: Syam Sidhardhan <s.syam@samsung.com>
> > 
> > kfree on NULL pointer is a no-op.
> > 
> > Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
> 
> With my ipwireless maintainer hat on:
> 
> 	Acked-by: Jiri Kosina <jkosina@suse.cz>
> 
> Greg, could you please take it through tty tree?

Ok, will do.

thanks,

greg k-h

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

end of thread, other threads:[~2013-03-08 17:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-06 20:17 [PATCH v1] tty: ipwireless: Remove redundant NULL check before kfree syamsidhardh
2013-03-08 13:26 ` Jiri Kosina
2013-03-08 17:48   ` Greg KH

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.