* [PATCH] tty: ipwireless: Remove redundant NULL check before kfree
@ 2013-03-05 19:33 Syam Sidhardhan
0 siblings, 0 replies; only message in thread
From: Syam Sidhardhan @ 2013-03-05 19:33 UTC (permalink / raw)
To: linux-kernel; +Cc: syamsidhardh, jslaby, gregkh
kfree on NULL pointer is a no-op.
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
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 [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-05 19:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-05 19:33 [PATCH] tty: ipwireless: Remove redundant NULL check before kfree Syam Sidhardhan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®