Skip to contentSkip to conversation

ath6kl: fix return value in ath6kl_wmi_set_pvb_cmd

PATCH In review Chaehyun Lim 2 participants 2 messages Sep 18, 2016 – Sep 28, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath6kl: fix return value in ath6kl_wmi_set_pvb_cmd

When building with W=1, we got one warning as belows:
drivers/net/wireless/ath/ath6kl/wmi.c:3509:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

At the end of ath6kl_wmi_set_pvb_cmd, it is returned by 0 regardless of return value of ath6kl_wmi_cmd_send.
This patch fixes return value from 0 to ret that has result of ath6kl_wmi_cmd_send execution.

---
 drivers/net/wireless/ath/ath6kl/wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath6kl/wmi.c +1 -1
index b8cf04d..3fd1cc9 100644
@@ -3520,7 +3520,7 @@ int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u8 if_idx, u16 aid,
 	ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_AP_SET_PVB_CMDID,
 				  NO_SYNC_WMIFLAG);
 
-	return 0;
+	return ret;
 }
 
 int ath6kl_wmi_set_rx_frame_format_cmd(struct wmi *wmi, u8 if_idx,
Signature · 1 line
2.9.3
#1 lore raw
Quoted 10 lines · Chaehyun Lim

When building with W=1, we got one warning as belows:
drivers/net/wireless/ath/ath6kl/wmi.c:3509:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

At the end of ath6kl_wmi_set_pvb_cmd, it is returned by 0 regardless of return value of ath6kl_wmi_cmd_send.
This patch fixes return value from 0 to ret that has result of ath6kl_wmi_cmd_send execution.

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

b93015057e31 ath6kl: fix return value in ath6kl_wmi_set_pvb_cmd

Signature · 6 lines
https://patchwork.kernel.org/patch/9337611/

Documentation about submitting wireless patches and checking status
from patchwork:

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