linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Rakesh Pillai <pillair@codeaurora.org>,
	ath10k@lists.infradead.org, kernel-janitors@vger.kernel.org,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ath10k: remove an unnecessary NULL check
Date: Thu, 29 Nov 2018 15:51:24 +0200	[thread overview]
Message-ID: <87sgzk56w3.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20181129103214.5tudci6izlfaasqx@kili.mountain> (Dan Carpenter's message of "Thu, 29 Nov 2018 13:32:14 +0300")

Dan Carpenter <dan.carpenter@oracle.com> writes:

> The "survey" pointer is the address of an array element.  We know that
> it can't be NULL so this check can be removed.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/net/wireless/ath/ath10k/wmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
> index 659513bf4ddc..6a04727b63ce 100644
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -2578,7 +2578,7 @@ static void ath10k_wmi_event_chan_info_unpaired(struct ath10k *ar,
>  
>  	survey = &ar->survey[idx];
>  
> -	if (!params->mac_clk_mhz || !survey)
> +	if (!params->mac_clk_mhz)
>  		return;

Can you please CC linux-wireless so that patchwork sees this?

-- 
Kalle Valo

       reply	other threads:[~2018-11-29 13:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181129103214.5tudci6izlfaasqx@kili.mountain>
2018-11-29 13:51 ` Kalle Valo [this message]
2018-11-29 14:21   ` [PATCH] ath10k: remove an unnecessary NULL check Dan Carpenter
2018-11-29 14:24 ` Dan Carpenter
2018-12-20 17:07   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgzk56w3.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=ath10k@lists.infradead.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pillair@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).