netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath6kl: remove redundant null pointer check on send_pkt
@ 2015-09-07 13:49 Colin King
  2015-10-09  8:47 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2015-09-07 13:49 UTC (permalink / raw)
  To: Kalle Valo, linux-wireless, netdev; +Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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>
---
 drivers/net/wireless/ath/ath6kl/htc_mbox.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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;
 }
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath6kl: remove redundant null pointer check on send_pkt
  2015-09-07 13:49 [PATCH] ath6kl: remove redundant null pointer check on send_pkt Colin King
@ 2015-10-09  8:47 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2015-10-09  8:47 UTC (permalink / raw)
  To: Colin King; +Cc: linux-wireless, netdev, linux-kernel

Colin King <colin.king@canonical.com> writes:

> From: Colin Ian King <colin.king@canonical.com>
>
> 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>

Applied, thanks.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-09  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-07 13:49 [PATCH] ath6kl: remove redundant null pointer check on send_pkt Colin King
2015-10-09  8:47 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).