aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Henzl2023-03-24 14:52:49 +0100
committerGreg Kroah-Hartman2023-04-26 14:28:36 +0200
commit83760e74ed1498167605abffd5c10fe0a3929ec4 (patch)
treeb1dee26637144263db3b059ced2025882ead4c3d
parente0ac735ee4e2c352a513eeff395ef42c5335ae2d (diff)
scsi: megaraid_sas: Fix fw_crash_buffer_show()
[ Upstream commit 0808ed6ebbc292222ca069d339744870f6d801da ] If crash_dump_buf is not allocated then crash dump can't be available. Replace logical 'and' with 'or'. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Link: https://lore.kernel.org/r/20230324135249.9733-1-thenzl@redhat.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index d265a2d9d082..13ee8e4c4f57 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -3299,7 +3299,7 @@ fw_crash_buffer_show(struct device *cdev,
spin_lock_irqsave(&instance->crashdump_lock, flags);
buff_offset = instance->fw_crash_buffer_offset;
- if (!instance->crash_dump_buf &&
+ if (!instance->crash_dump_buf ||
!((instance->fw_crash_state == AVAILABLE) ||
(instance->fw_crash_state == COPYING))) {
dev_err(&instance->pdev->dev,