Skip to content

Commit

Permalink
staging: ozwpan: Remove redundant null check before kfree in ozproto.c
Browse files Browse the repository at this point in the history
kfree on NULL pointer is a no-op.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Sachin Kamat authored and Greg Kroah-Hartman committed Nov 21, 2012
1 parent b150718 commit ba34efb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/ozwpan/ozproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,7 @@ static void oz_protocol_timer(unsigned long arg)
}
spin_unlock_bh(&g_polling_lock);
oz_pd_put(pd);
if (t)
kfree(t);
kfree(t);
t = t2;
} while (t);
g_timer_state = OZ_TIMER_IDLE;
Expand Down

0 comments on commit ba34efb

Please sign in to comment.