From: Colin Ian King Date: Mon, 7 Sep 2015 13:49:05 +0000 (+0100) Subject: ath6kl: remove redundant null pointer check on send_pkt X-Git-Tag: v4.14-rc1~4436^2~54^2~2^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=101d1f7fbf7dbb881f808c0fdc23124051ac5da6;p=platform%2Fkernel%2Flinux-rpi.git ath6kl: remove redundant null pointer check on send_pkt 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 Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c index e481f14..fffb65b 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c +++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c @@ -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; }