Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1572799ybj; Wed, 6 May 2020 00:52:37 -0700 (PDT) X-Google-Smtp-Source: APiQypLrKvFmrn0ZXROXmIhEFzzrPwwMY5/OEj85AcUNYKxkn4lrQYR+1uzSN/VRxBRk7hlWq+re X-Received: by 2002:a50:e80a:: with SMTP id e10mr5812390edn.204.1588751557408; Wed, 06 May 2020 00:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588751557; cv=none; d=google.com; s=arc-20160816; b=aSOJbhf03U3pbemikXk18rqoWYPtCKkM+anKWNQ6Bif6a6gU7AiGefKc8slGNDVafb 5mujPR+KIx86fTakbP6CJvoSGaHLeURbIiP3H3Taws05mCoX0udDlYt4TGtF6P0qhJ7Z Jkj9bxVurqmpgdPV+TTO1aJtIucN5fCwKtySuUxaOfcH1o7U6mqYbmj5KXb+UaICybtV OJgLr1ftNqEUF1DaT3D77829hf2Yx2DviV3Ei40YBAqHNSweBt+mb/NGdgbbsRFkFr/f mXp11S28G37cCObaR7GYopRALpSVzgVIESfJoDcQxQKe4K6ZFU/7D4u39KptOeM2Mfwc kJsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=zjeC0YgJHaHibVYSaSf9vO4yDS6t9cuLN0lQutfN+ro=; b=t3uoi2U45+FbiFoMqnBZyMoDsI+4NoOyIEM1Z+MHvpKIMWj7HfsrhEV/iT4zRn4+17 W1H7fYn/brmr70bm8VJFPR1CAG5dUiIvPBdstihr+y0/lV9JZfwfP5/RHnimSbfcfZ4u r1BwV9SM3Qa0SdKXYGq4maE+8SH0fW1j3puAZP7v1EKA5jf7HK/9vlzI9Vv5eLVk5Nsy opLkWrBVWuPp9/Zu9edp6ntu3aJ6I3aeZaKXNJob9lkHMEt8P7WMGVTsx7EQ+VvRxhME 8Q3v53ff9Dn28bAYnjzorJtXr78ixxvUYUa8O5pEBGRGVxCmuwtTytryYeve7zdCrGRa ejnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l35si516985edl.187.2020.05.06.00.52.14; Wed, 06 May 2020 00:52:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728419AbgEFHsU (ORCPT + 99 others); Wed, 6 May 2020 03:48:20 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:50036 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728335AbgEFHsU (ORCPT ); Wed, 6 May 2020 03:48:20 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id EDDA8548B739D91516FA; Wed, 6 May 2020 15:48:17 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Wed, 6 May 2020 15:48:10 +0800 From: Samuel Zou To: , , , CC: , , Samuel Zou Subject: [PATCH -next] scsi: qla2xxx: Use PTR_ERR_OR_ZERO() to simplify code Date: Wed, 6 May 2020 15:54:10 +0800 Message-ID: <1588751650-37186-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes coccicheck warning: drivers/scsi/qla2xxx/tcm_qla2xxx.c:1488:1-3: WARNING: PTR_ERR_OR_ZERO can be used Reported-by: Hulk Robot Signed-off-by: Samuel Zou --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 1f0a185..7c4157e 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -1485,10 +1485,8 @@ 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.6.2