Skip to content

Commit

Permalink
ath6kl: remove redundant null pointer check on send_pkt
Browse files Browse the repository at this point in the history
The check for send_pkt being NULL is redundant before the call
to htc_reclaim_txctrl_buf, therefore it should be removed. This was
detected by static analysis by cppcheck.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Colin Ian King authored and Kalle Valo committed Oct 9, 2015
1 parent f13e063 commit 101d1f7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/wireless/ath/ath6kl/htc_mbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -1085,9 +1085,7 @@ static int htc_setup_tx_complete(struct htc_target *target)
send_pkt->completion = NULL;
ath6kl_htc_tx_prep_pkt(send_pkt, 0, 0, 0);
status = ath6kl_htc_tx_issue(target, send_pkt);

if (send_pkt != NULL)
htc_reclaim_txctrl_buf(target, send_pkt);
htc_reclaim_txctrl_buf(target, send_pkt);

return status;
}
Expand Down

0 comments on commit 101d1f7

Please sign in to comment.