Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Krishna Gudipati and committed by
James Bottomley
9afbcfab 7826f304

+5 -5
+5 -5
drivers/scsi/bfa/bfad_bsg.c
··· 56 56 spin_lock_irqsave(&bfad->bfad_lock, flags); 57 57 if (bfad->disable_active) { 58 58 spin_unlock_irqrestore(&bfad->bfad_lock, flags); 59 - return EBUSY; 59 + return -EBUSY; 60 60 } 61 61 62 62 bfad->disable_active = BFA_TRUE; ··· 390 390 void *iocmd_bufptr; 391 391 392 392 if (iocmd->nrports == 0) 393 - return EINVAL; 393 + return -EINVAL; 394 394 395 395 if (bfad_chk_iocmd_sz(payload_len, 396 396 sizeof(struct bfa_bsg_lport_get_rports_s), ··· 1516 1516 bfad_iocmd_handler(struct bfad_s *bfad, unsigned int cmd, void *iocmd, 1517 1517 unsigned int payload_len) 1518 1518 { 1519 - int rc = EINVAL; 1519 + int rc = -EINVAL; 1520 1520 1521 1521 switch (cmd) { 1522 1522 case IOCMD_IOC_ENABLE: ··· 1704 1704 rc = bfad_iocmd_porglog_get(bfad, iocmd); 1705 1705 break; 1706 1706 default: 1707 - rc = EINVAL; 1707 + rc = -EINVAL; 1708 1708 break; 1709 1709 } 1710 - return -rc; 1710 + return rc; 1711 1711 } 1712 1712 1713 1713 static int