ath10k: fix null dereference on pointer crash_data

Currently when pointer crash_data is null the present null check
will also check that crash_data->ramdump_buf is null and will cause
a null pointer dereference on crash_data. Fix this by using the ||
operator instead of &&.

Fixes: 3f14b73c38 ("ath10k: Enable MSA region dump support for WCN3990")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Colin Ian King
2019-10-04 17:02:27 +01:00
committed by Kalle Valo
parent cc78dc3b79
commit a69d3bdd4d

View File

@@ -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);