netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] ath11k: fix error check on return from call to ath11k_core_firmware_request
@ 2020-08-19 10:57 Colin King
  2020-08-27 11:32 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-08-19 10:57 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, ath11k, linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel

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

The call to ath11k_core_firmware_request is returning a pointer that
can be set to an error code, however, this is not being checked.
Instead ret is being incorrecly checked for the error return. Fix the
error checking.

Addresses-Coverity: ("Logically dead code")
Fixes: 7b57b2ddec21 ("ath11k: create a common function to request all firmware files")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/ath/ath11k/qmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 91134510364c..4792857678b9 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -1886,7 +1886,7 @@ ath11k_qmi_prepare_bdf_download(struct ath11k_base *ab, int type,
 		break;
 	case ATH11K_QMI_FILE_TYPE_CALDATA:
 		fw_entry = ath11k_core_firmware_request(ab, ATH11K_DEFAULT_CAL_FILE);
-		if (ret) {
+		if (PTR_ERR(fw_entry)) {
 			ath11k_warn(ab, "failed to load %s: %d\n",
 				    ATH11K_DEFAULT_CAL_FILE, ret);
 			goto out;
-- 
2.27.0


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

* Re: [PATCH][next] ath11k: fix error check on return from call to ath11k_core_firmware_request
  2020-08-19 10:57 [PATCH][next] ath11k: fix error check on return from call to ath11k_core_firmware_request Colin King
@ 2020-08-27 11:32 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-08-27 11:32 UTC (permalink / raw)
  To: Colin King
  Cc: David S . Miller, Jakub Kicinski, ath11k, linux-wireless, netdev,
	kernel-janitors, linux-kernel

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

> From: Colin Ian King <colin.king@canonical.com>
> 
> The call to ath11k_core_firmware_request is returning a pointer that
> can be set to an error code, however, this is not being checked.
> Instead ret is being incorrecly checked for the error return. Fix the
> error checking.
> 
> Addresses-Coverity: ("Logically dead code")
> Fixes: 7b57b2ddec21 ("ath11k: create a common function to request all firmware files")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

A similar patch has been already applied.

error: patch failed: drivers/net/wireless/ath/ath11k/qmi.c:1886
error: drivers/net/wireless/ath/ath11k/qmi.c: patch does not apply
stg import: Diff does not apply cleanly

Patch set to Rejected.

-- 
https://patchwork.kernel.org/patch/11723519/

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


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

end of thread, other threads:[~2020-08-27 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 10:57 [PATCH][next] ath11k: fix error check on return from call to ath11k_core_firmware_request Colin King
2020-08-27 11:32 ` 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).