[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1362601044-6228-1-git-send-email-s.syam@samsung.com>
Date: Thu, 7 Mar 2013 01:47:24 +0530
From: syamsidhardh@...il.com
To: linux-kernel@...r.kernel.org
Cc: syamsidhardh@...il.com, jslaby@...e.cz, gregkh@...uxfoundation.org,
Syam Sidhardhan <s.syam@...sung.com>
Subject: [PATCH v1] tty: ipwireless: Remove redundant NULL check before kfree
From: Syam Sidhardhan <s.syam@...sung.com>
kfree on NULL pointer is a no-op.
Signed-off-by: Syam Sidhardhan <s.syam@...sung.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists