lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20181127082027.46223-1-wen.yang99@zte.com.cn>
Date:   Tue, 27 Nov 2018 16:20:27 +0800
From:   Wen Yang <wen.yang99@....com.cn>
To:     jejb@...ux.vnet.ibm.com, martin.petersen@...cle.com
Cc:     qla2xxx-upstream@...gic.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, zhong.weidong@....com.cn,
        Wen Yang <wen.yang99@....com.cn>,
        Wen Yang <yellowriver2010@...mail.com>
Subject: [PATCH] scsi: qla2xxx: Use PTR_ERR_OR_ZERO to replace the open coded version

PTR_ERR_OR_ZERO has implemented the same function, so use inlined function
instead of open coded equivalent.

Signed-off-by: Wen Yang <wen.yang99@....com.cn>
CC: "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>
CC: "Martin K. Petersen" <martin.petersen@...cle.com>
CC: qla2xxx-upstream@...gic.com
CC: linux-scsi@...r.kernel.org
CC: Wen Yang <yellowriver2010@...mail.com>
CC: linux-kernel@...r.kernel.org
---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 65053c066680..633f258085c7 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -1577,10 +1577,7 @@ static int tcm_qla2xxx_check_initiator_node_acl(
 				       sizeof(struct qla_tgt_cmd),
 				       TARGET_PROT_ALL, port_name,
 				       qlat_sess, tcm_qla2xxx_session_cb);
-	if (IS_ERR(se_sess))
-		return PTR_ERR(se_sess);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(se_sess);
 }
 
 static void tcm_qla2xxx_update_sess(struct fc_port *sess, port_id_t s_id,
-- 
2.19.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ