tty: ipwireless: Remove redundant NULL check before kfree
authorSyam Sidhardhan <syamsidhardh@gmail.com>
Tue, 5 Mar 2013 19:33:22 +0000 (01:03 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 20:58:32 +0000 (13:58 -0700)
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/ipwireless/hardware.c

index 97a511f4185df58d0dbe06db372b020d1890c5cb..2c14842541dd74e7d05115f2d114567b902f84a0 100644 (file)
@@ -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) {