summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-10-19 12:18:19 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-10-20 01:31:37 +0300
commita0db8a7516d9eb9ebb7400df21fc061fe472b8ad (patch)
tree754621f56ceae669058589eb2c25f46a4f223745 /drivers/scsi
parent9a231caa77c3afdf775bcc9b7c403244deb3d539 (diff)
downloadlinux-a0db8a7516d9eb9ebb7400df21fc061fe472b8ad.tar.xz
scsi: myrs: Fix the processor absent message in processor_show()
If both processors are absent then it's supposed to print that, but instead we print that just the second processor is absent. Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/myrs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index 947d9b63d922..0264a2e2bc19 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -1366,11 +1366,11 @@ static ssize_t processor_show(struct device *dev,
first_processor, info->cpu[0].cpu_count,
info->cpu[1].cpu_name,
second_processor, info->cpu[1].cpu_count);
- else if (!second_processor)
+ else if (first_processor && !second_processor)
ret = snprintf(buf, 64, "1: %s (%s, %d cpus)\n2: absent\n",
info->cpu[0].cpu_name,
first_processor, info->cpu[0].cpu_count);
- else if (!first_processor)
+ else if (!first_processor && second_processor)
ret = snprintf(buf, 64, "1: absent\n2: %s (%s, %d cpus)\n",
info->cpu[1].cpu_name,
second_processor, info->cpu[1].cpu_count);