Skip to content

Commit

Permalink
wil6210: Delete an unnecessary kfree() call in wil_tid_ampdu_rx_alloc()
Browse files Browse the repository at this point in the history
A null pointer would be passed to a call of the function “kfree”
directly after a call of the function “kcalloc” failed at one place.
Remove this superfluous function call.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Reviewed-by: Maya Erez <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
elfring authored and Kalle Valo committed Sep 4, 2019
1 parent 9abe3e3 commit d20b1e6
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/wireless/ath/wil6210/rx_reorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ struct wil_tid_ampdu_rx *wil_tid_ampdu_rx_alloc(struct wil6210_priv *wil,
r->reorder_buf =
kcalloc(size, sizeof(struct sk_buff *), GFP_KERNEL);
if (!r->reorder_buf) {
kfree(r->reorder_buf);
kfree(r);
return NULL;
}
Expand Down

0 comments on commit d20b1e6

Please sign in to comment.