* [PATCH] megaraid_sas: a fix in fw_crash_buffer_show
@ 2023-03-24 13:52 Tomas Henzl
2023-03-25 1:18 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Tomas Henzl @ 2023-03-24 13:52 UTC (permalink / raw)
To: linux-scsi; +Cc: sumit.saxena, chandrakanth.patil
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>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 63ea0aed47aa..c9e2aa2f952f 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -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,
--
2.39.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] megaraid_sas: a fix in fw_crash_buffer_show
2023-03-24 13:52 [PATCH] megaraid_sas: a fix in fw_crash_buffer_show Tomas Henzl
@ 2023-03-25 1:18 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2023-03-25 1:18 UTC (permalink / raw)
To: Tomas Henzl; +Cc: linux-scsi, sumit.saxena, chandrakanth.patil
Tomas,
> If crash_dump_buf is not allocated then crash dump can't be
> available. Replace logical 'and' with 'or'.
Applied to 6.3/scsi-fixes, thanks!
[1/1] scsi: megaraid_sas: Fix fw_crash_buffer_show()
https://git.kernel.org/mkp/scsi/c/0808ed6ebbc2
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-25 1:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-24 13:52 [PATCH] megaraid_sas: a fix in fw_crash_buffer_show Tomas Henzl
2023-03-25 1:18 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox