From patchwork Tue Aug 29 13:50:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Jha X-Patchwork-Id: 9927409 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4466B60380 for ; Tue, 29 Aug 2017 13:51:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3823228912 for ; Tue, 29 Aug 2017 13:51:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CACB2891A; Tue, 29 Aug 2017 13:51:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS, RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB autolearn=no version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C207028912 for ; Tue, 29 Aug 2017 13:51:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753954AbdH2Nuy (ORCPT ); Tue, 29 Aug 2017 09:50:54 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34257 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbdH2Nux (ORCPT ); Tue, 29 Aug 2017 09:50:53 -0400 Received: by mail-pf0-f193.google.com with SMTP id p69so2382534pfk.1; Tue, 29 Aug 2017 06:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=YGeIIWPews0mQ6vXa9au+NNZjF7krl1wxpF3DXVIGJU=; b=hquKjLilQepAttOT+BytW7xiaO2aZrJXjPbSJDT2zdQNORykxsodSfa5sGbbcdgIYG HD4+pNLGsaLHp8euyIUit3D7coUpGS9Q4wgll1Cou8PFqTk1AwdISHvSE1Zr5S3Uyxsk vbUGNCbpCD1fWvppsGQigsyYSApzy+6ijTUnzJI8Dap9l+buQYo/n9yX2qnu3CG5Xcpq XOYM2pADd9D/7RbmUHevbEK1CkDw+YwbaCGtq5NG0vFg0jp0QNrbcdOoQTakqmFrL9MS +pgJCHPOprCpZUupvEy4B7avoAaIxrbY3uv6jEqN3dlvL0BxefpBUAObABeX8z0wXash wZPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YGeIIWPews0mQ6vXa9au+NNZjF7krl1wxpF3DXVIGJU=; b=Vgf/qT34NYUKM8KPxjMjm5xiohYlPXr3RMwSOosBj7isHkriDqX8CXd9MfUg4jf8VR Nyfsj8OWJ5eKGkWqVxUbWR9FCpor97NLB21WaS6LR0mwE0bglrUDrikjeWKcadU4SnLT Cb0CadzPdEmnAyIR2fIlw/+obTOnxqZEfBZtFVXrxIy6H+y+WULSFyM/xrQvv8feyyeB qBFlWYmeORUobyzwfH3SQx62hvFRrUWqizuEsgA1avtadc8kfETaVsQdR7UOctNXnaVD Jk5f0My103iUaZUKOCqb4o7bMme6uIM/BhgI/eijy/emxKfkSNyNV0EnD1Qg1ahpYPXT x3QQ== X-Gm-Message-State: AHYfb5iwbPKhQTb9KKXmDbzn5udhr54OeISQX3aXM3ujAy65UwBS1v2D /DynF7HIrKfLDg== X-Google-Smtp-Source: ADKCNb6icrgDac2CozDT29/p4XJGCbWYOpqSuKfUb8jDmfvpOAlaNq6YI/F6ou1tl6SeBfCFWAIZig== X-Received: by 10.84.175.195 with SMTP id t61mr527651plb.254.1504014653424; Tue, 29 Aug 2017 06:50:53 -0700 (PDT) Received: from localhost.localdomain ([103.254.204.108]) by smtp.gmail.com with ESMTPSA id c14sm5607106pfm.151.2017.08.29.06.50.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Aug 2017 06:50:52 -0700 (PDT) From: Himanshu Jha To: jejb@linux.vnet.ibm.com Cc: martin.petersen@oracle.com, qla2xxx-upstream@qlogic.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Himanshu Jha Subject: [PATCH] scsi: qla2xxx: Use PTR_ERR_OR_ZERO Date: Tue, 29 Aug 2017 19:20:27 +0530 Message-Id: <1504014627-17141-1-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha --- 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 3f82ea1..bf33350 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -1522,10 +1522,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,