diff mbox series

[08/12] wifi: mwifiex: fix endian conversion

Message ID 20220904212910.a32e45adb2b2.I8c966b07c0bf7be4485967b044d9dad3f4772a27@changeid
State New
Headers show
Series [01/12] wifi: ipw2100: fix warnings about non-kernel-doc | expand

Commit Message

Johannes Berg Sept. 4, 2022, 7:29 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

Clearly the value should be converted and then compared,
not the result of the comparison be converted. No binary
changes on x86.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/marvell/mwifiex/sta_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Brian Norris Sept. 6, 2022, 10:22 p.m. UTC | #1
On Sun, Sep 04, 2022 at 09:29:08PM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> Clearly the value should be converted and then compared,
> not the result of the comparison be converted. No binary
> changes on x86.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Reviewed-by: Brian Norris <briannorris@chromium.org>
diff mbox series

Patch

diff --git a/drivers/net/wireless/marvell/mwifiex/sta_event.c b/drivers/net/wireless/marvell/mwifiex/sta_event.c
index b95e90a7d124..b6315fccd1bb 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_event.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c
@@ -623,7 +623,7 @@  mwifiex_fw_dump_info_event(struct mwifiex_private *priv,
 		adapter->event_skb->data, event_skb->len);
 	adapter->devdump_len += event_skb->len;
 
-	if (le16_to_cpu(fw_dump_hdr->type == FW_DUMP_INFO_ENDED)) {
+	if (le16_to_cpu(fw_dump_hdr->type) == FW_DUMP_INFO_ENDED) {
 		mwifiex_dbg(adapter, MSG,
 			    "receive end of transmission flag event!\n");
 		goto upload_dump;