ath10k: Fix an && vs || typo
diff mbox series

Message ID 20191007085003.GB3865@mwanda
State Rejected
Delegated to: Kalle Valo
Headers show
Series
  • ath10k: Fix an && vs || typo
Related show

Commit Message

Dan Carpenter Oct. 7, 2019, 8:50 a.m. UTC
The kernel will Oops later in the function if either of these pointers
is NULL so clearly || was intended instead of &&.

Fixes: 3f14b73c3843 ("ath10k: Enable MSA region dump support for WCN3990")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/wireless/ath/ath10k/snoc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Oct. 8, 2019, 3:42 p.m. UTC | #1
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> The kernel will Oops later in the function if either of these pointers
> is NULL so clearly || was intended instead of &&.
> 
> Fixes: 3f14b73c3843 ("ath10k: Enable MSA region dump support for WCN3990")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Sorry, Colin was faster :)

https://patchwork.kernel.org/patch/11174955/

Patch set to Rejected.

Patch
diff mbox series

diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index cd22c8654aa9..16177497bba7 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1400,7 +1400,7 @@  static void ath10k_msa_dump_memory(struct ath10k *ar,
 	size_t buf_len;
 	u8 *buf;
 
-	if (!crash_data && !crash_data->ramdump_buf)
+	if (!crash_data || !crash_data->ramdump_buf)
 		return;
 
 	mem_layout = ath10k_coredump_get_mem_layout(ar);