aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2009-11-12 13:50:06 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-11-13 02:45:54 -0500
commit8721c81f6480e2c9acbf92078383953f825d1057 (patch)
treea0ccf01bd22f1685462235866843e04a4859677f /drivers
parent5c07a311a80adb0138fc08e8279c60255d88d0b8 (diff)
cciss: Fix weird usage of ENXIO in cciss_scsi.c
cciss: Fix weird usage of ENXIO in cciss_scsi.c Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/cciss.c7
-rw-r--r--drivers/block/cciss_scsi.c2
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 1bd313dcf6a..eab81c6c0ca 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -422,12 +422,9 @@ cciss_proc_write(struct file *file, const char __user *buf,
422 if (strncmp(ENGAGE_SCSI, buffer, sizeof ENGAGE_SCSI - 1) == 0) { 422 if (strncmp(ENGAGE_SCSI, buffer, sizeof ENGAGE_SCSI - 1) == 0) {
423 struct seq_file *seq = file->private_data; 423 struct seq_file *seq = file->private_data;
424 ctlr_info_t *h = seq->private; 424 ctlr_info_t *h = seq->private;
425 int rc;
426 425
427 rc = cciss_engage_scsi(h->ctlr); 426 err = cciss_engage_scsi(h->ctlr);
428 if (rc != 0) 427 if (err == 0)
429 err = -rc;
430 else
431 err = length; 428 err = length;
432 } else 429 } else
433#endif /* CONFIG_CISS_SCSI_TAPE */ 430#endif /* CONFIG_CISS_SCSI_TAPE */
diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
index 237d2b35365..5d0e46dc363 100644
--- a/drivers/block/cciss_scsi.c
+++ b/drivers/block/cciss_scsi.c
@@ -1547,7 +1547,7 @@ cciss_engage_scsi(int ctlr)
1547 if (sa->registered) { 1547 if (sa->registered) {
1548 printk("cciss%d: SCSI subsystem already engaged.\n", ctlr); 1548 printk("cciss%d: SCSI subsystem already engaged.\n", ctlr);
1549 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); 1549 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
1550 return ENXIO; 1550 return -ENXIO;
1551 } 1551 }
1552 sa->registered = 1; 1552 sa->registered = 1;
1553 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); 1553 spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);