Commit 8721c81f authored by Stephen M. Cameron's avatar Stephen M. Cameron Committed by Jens Axboe

cciss: Fix weird usage of ENXIO in cciss_scsi.c

cciss: Fix weird usage of ENXIO in cciss_scsi.c
Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 5c07a311
...@@ -422,12 +422,9 @@ cciss_proc_write(struct file *file, const char __user *buf, ...@@ -422,12 +422,9 @@ cciss_proc_write(struct file *file, const char __user *buf,
if (strncmp(ENGAGE_SCSI, buffer, sizeof ENGAGE_SCSI - 1) == 0) { if (strncmp(ENGAGE_SCSI, buffer, sizeof ENGAGE_SCSI - 1) == 0) {
struct seq_file *seq = file->private_data; struct seq_file *seq = file->private_data;
ctlr_info_t *h = seq->private; ctlr_info_t *h = seq->private;
int rc;
rc = cciss_engage_scsi(h->ctlr); err = cciss_engage_scsi(h->ctlr);
if (rc != 0) if (err == 0)
err = -rc;
else
err = length; err = length;
} else } else
#endif /* CONFIG_CISS_SCSI_TAPE */ #endif /* CONFIG_CISS_SCSI_TAPE */
......
...@@ -1547,7 +1547,7 @@ cciss_engage_scsi(int ctlr) ...@@ -1547,7 +1547,7 @@ cciss_engage_scsi(int ctlr)
if (sa->registered) { if (sa->registered) {
printk("cciss%d: SCSI subsystem already engaged.\n", ctlr); printk("cciss%d: SCSI subsystem already engaged.\n", ctlr);
spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
return ENXIO; return -ENXIO;
} }
sa->registered = 1; sa->registered = 1;
spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment