ath10k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: Fix an error code in ath10k_add_interface()
@ 2021-05-25 10:46 Yang Li
  2021-06-14 15:40 ` Kalle Valo
  2021-06-15 14:03 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Li @ 2021-05-25 10:46 UTC (permalink / raw)
  To: davem; +Cc: kuba, kvalo, ath10k, linux-wireless, netdev, linux-kernel, Yang Li

When the code execute this if statement, the value of ret is 0. 
However, we can see from the ath10k_warn() log that the value of 
ret should be -EINVAL.

Clean up smatch warning:

drivers/net/wireless/ath/ath10k/mac.c:5596 ath10k_add_interface() warn:
missing error code 'ret'

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: 'commit ccec9038c721 ("ath10k: enable raw encap mode and software
crypto engine")'
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 5ce4f8d..c272b29 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -5592,6 +5592,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
 
 	if (arvif->nohwcrypt &&
 	    !test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) {
+		ret = -EINVAL;
 		ath10k_warn(ar, "cryptmode module param needed for sw crypto\n");
 		goto err;
 	}
-- 
1.8.3.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH] ath10k: Fix an error code in ath10k_add_interface()
  2021-05-25 10:46 [PATCH] ath10k: Fix an error code in ath10k_add_interface() Yang Li
@ 2021-06-14 15:40 ` Kalle Valo
  2021-06-15 14:03 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-06-14 15:40 UTC (permalink / raw)
  To: Yang Li
  Cc: davem, kuba, ath10k, linux-wireless, netdev, linux-kernel, Yang Li

Yang Li <yang.lee@linux.alibaba.com> wrote:

> When the code execute this if statement, the value of ret is 0.
> However, we can see from the ath10k_warn() log that the value of
> ret should be -EINVAL.
> 
> Clean up smatch warning:
> 
> drivers/net/wireless/ath/ath10k/mac.c:5596 ath10k_add_interface() warn:
> missing error code 'ret'
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 'commit ccec9038c721 ("ath10k: enable raw encap mode and software
> crypto engine")'
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Fixes tag is wrong, it should be:

Fixes: ccec9038c721 ("ath10k: enable raw encap mode and software crypto engine")

I fixed this in the pending branch, no need to resend because of this.

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1621939577-62218-1-git-send-email-yang.lee@linux.alibaba.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH] ath10k: Fix an error code in ath10k_add_interface()
  2021-05-25 10:46 [PATCH] ath10k: Fix an error code in ath10k_add_interface() Yang Li
  2021-06-14 15:40 ` Kalle Valo
@ 2021-06-15 14:03 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-06-15 14:03 UTC (permalink / raw)
  To: Yang Li
  Cc: davem, kuba, ath10k, linux-wireless, netdev, linux-kernel, Yang Li

Yang Li <yang.lee@linux.alibaba.com> wrote:

> When the code execute this if statement, the value of ret is 0.
> However, we can see from the ath10k_warn() log that the value of
> ret should be -EINVAL.
> 
> Clean up smatch warning:
> 
> drivers/net/wireless/ath/ath10k/mac.c:5596 ath10k_add_interface() warn:
> missing error code 'ret'
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: ccec9038c721 ("ath10k: enable raw encap mode and software crypto engine")
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

e9ca70c735ce ath10k: Fix an error code in ath10k_add_interface()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1621939577-62218-1-git-send-email-yang.lee@linux.alibaba.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

end of thread, other threads:[~2021-06-15 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 10:46 [PATCH] ath10k: Fix an error code in ath10k_add_interface() Yang Li
2021-06-14 15:40 ` Kalle Valo
2021-06-15 14:03 ` 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).