aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2011-07-20 19:59:44 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-07-27 06:44:06 -0400
commit9afbcfab74d26051702862b57c0115f71477a3cc (patch)
tree4ed2dd5c6d0334c21cb191540942a41d9290248a /drivers/scsi/bfa
parent7826f304b1efa5ab839cf029742290f51c4fa009 (diff)
[SCSI] bfa: use negative error return values in all functions
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa')
-rw-r--r--drivers/scsi/bfa/bfad_bsg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index 88bfa92af740..3601508900b3 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -56,7 +56,7 @@ bfad_iocmd_ioc_disable(struct bfad_s *bfad, void *cmd)
56 spin_lock_irqsave(&bfad->bfad_lock, flags); 56 spin_lock_irqsave(&bfad->bfad_lock, flags);
57 if (bfad->disable_active) { 57 if (bfad->disable_active) {
58 spin_unlock_irqrestore(&bfad->bfad_lock, flags); 58 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
59 return EBUSY; 59 return -EBUSY;
60 } 60 }
61 61
62 bfad->disable_active = BFA_TRUE; 62 bfad->disable_active = BFA_TRUE;
@@ -390,7 +390,7 @@ bfad_iocmd_lport_get_rports(struct bfad_s *bfad, void *cmd,
390 void *iocmd_bufptr; 390 void *iocmd_bufptr;
391 391
392 if (iocmd->nrports == 0) 392 if (iocmd->nrports == 0)
393 return EINVAL; 393 return -EINVAL;
394 394
395 if (bfad_chk_iocmd_sz(payload_len, 395 if (bfad_chk_iocmd_sz(payload_len,
396 sizeof(struct bfa_bsg_lport_get_rports_s), 396 sizeof(struct bfa_bsg_lport_get_rports_s),
@@ -1516,7 +1516,7 @@ static int
1516bfad_iocmd_handler(struct bfad_s *bfad, unsigned int cmd, void *iocmd, 1516bfad_iocmd_handler(struct bfad_s *bfad, unsigned int cmd, void *iocmd,
1517 unsigned int payload_len) 1517 unsigned int payload_len)
1518{ 1518{
1519 int rc = EINVAL; 1519 int rc = -EINVAL;
1520 1520
1521 switch (cmd) { 1521 switch (cmd) {
1522 case IOCMD_IOC_ENABLE: 1522 case IOCMD_IOC_ENABLE:
@@ -1704,10 +1704,10 @@ bfad_iocmd_handler(struct bfad_s *bfad, unsigned int cmd, void *iocmd,
1704 rc = bfad_iocmd_porglog_get(bfad, iocmd); 1704 rc = bfad_iocmd_porglog_get(bfad, iocmd);
1705 break; 1705 break;
1706 default: 1706 default:
1707 rc = EINVAL; 1707 rc = -EINVAL;
1708 break; 1708 break;
1709 } 1709 }
1710 return -rc; 1710 return rc;
1711} 1711}
1712 1712
1713static int 1713static int