Skip to content

Commit

Permalink
scsi: megaraid_sas: Fix fw_crash_buffer_show()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Henzl authored and Martin K. Petersen committed Mar 25, 2023
1 parent a13faca commit 0808ed6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/megaraid/megaraid_sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3298,7 +3298,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,
Expand Down

0 comments on commit 0808ed6

Please sign in to comment.