ath10k: fix null dereference on pointer crash_data
authorColin Ian King <colin.king@canonical.com>
Fri, 4 Oct 2019 16:02:27 +0000 (17:02 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 11 Oct 2019 08:45:53 +0000 (11:45 +0300)
commita69d3bdd4d40c8f780c94b5e1983adb1cd389b59
treeec054f4001547aec4f0d52dc0bd3a762b2c535b1
parentcc78dc3b790619aa05f22a86a9152986bd73698c
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: 3f14b73c3843 ("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>
drivers/net/wireless/ath/ath10k/snoc.c