Skip to contentSkip to conversation

tty: ipwireless: Remove redundant NULL check before kfree

PATCH New Syam Sidhardhan 1 participant 1 message Mar 5, 2013 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: ipwireless: Remove redundant NULL check before kfree

kfree on NULL pointer is a no-op.

---
 drivers/tty/ipwireless/hardware.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/ipwireless/hardware.c +1 -2
index 97a511f..2c14842 100644
@@ -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) {
Signature · 1 line
1.7.9.5