Skip to content

Commit

Permalink
staging: ozwpan: Remove redundant null check before kfree in ozhcd.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 ba34efb commit 7010157
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/ozwpan/ozhcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,7 @@ static void oz_free_urb_link(struct oz_urb_link *urbl)
g_link_pool_size++;
}
spin_unlock_irqrestore(&g_link_lock, irq_state);
if (urbl)
kfree(urbl);
kfree(urbl);
}
}
/*------------------------------------------------------------------------------
Expand Down

0 comments on commit 7010157

Please sign in to comment.