Skip to content

Commit

Permalink
tty: ipwireless: Remove redundant NULL check before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Syam Sidhardhan authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent ef44d28 commit f3c8279
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/tty/ipwireless/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f3c8279

Please sign in to comment.