From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Dinghao Liu <dinghao.liu@zju.edu.cn>
Cc: kjlu@umn.edu, Kalle Valo <kvalo@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iwlegacy: Add missing check in il4965_commit_rxon
Date: Mon, 1 Mar 2021 08:25:47 +0100 [thread overview]
Message-ID: <20210301072547.GA118024@wp.pl> (raw)
In-Reply-To: <20210228122522.2513-1-dinghao.liu@zju.edu.cn>
On Sun, Feb 28, 2021 at 08:25:22PM +0800, Dinghao Liu wrote:
> There is one il_set_tx_power() call in this function without
> return value check. Print error message and return error code
> on failure just like the other il_set_tx_power() call.
We have few calls for il_set_tx_power(), on some cases we
check return on some not. That correct as setting tx power
can be deferred internally if not possible at the moment.
> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> ---
> drivers/net/wireless/intel/iwlegacy/4965.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/intel/iwlegacy/4965.c b/drivers/net/wireless/intel/iwlegacy/4965.c
> index 9fa556486511..3235b8be1894 100644
> --- a/drivers/net/wireless/intel/iwlegacy/4965.c
> +++ b/drivers/net/wireless/intel/iwlegacy/4965.c
> @@ -1361,7 +1361,11 @@ il4965_commit_rxon(struct il_priv *il)
> * We do not commit tx power settings while channel changing,
> * do it now if tx power changed.
> */
> - il_set_tx_power(il, il->tx_power_next, false);
> + ret = il_set_tx_power(il, il->tx_power_next, false);
> + if (ret) {
> + IL_ERR("Error sending TX power (%d)\n", ret);
> + return ret;
> +
This is not good change. We do not check return value of
il_commit_rxon(), except when creating interface. So this change might
broke creating interface, what worked otherwise when il_set_tx_power()
returned error.
Stanislaw
next prev parent reply other threads:[~2021-03-01 7:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-28 12:25 [PATCH] iwlegacy: Add missing check in il4965_commit_rxon Dinghao Liu
2021-03-01 7:25 ` Stanislaw Gruszka [this message]
2021-03-01 7:41 ` dinghao.liu
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=20210301072547.GA118024@wp.pl \
--to=stf_xl@wp.pl \
--cc=davem@davemloft.net \
--cc=dinghao.liu@zju.edu.cn \
--cc=kjlu@umn.edu \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.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).