Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3135381pxk; Mon, 21 Sep 2020 06:13:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9pA9k+PgL3v51YuihBCnChHi9lwNOIWpf64HvRDhrPYNba6SlkuNLCcpvaKG43AvtPhSq X-Received: by 2002:aa7:d68c:: with SMTP id d12mr53306628edr.274.1600694031886; Mon, 21 Sep 2020 06:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600694031; cv=none; d=google.com; s=arc-20160816; b=vLrnRmYFpmYTKDvE9d3ddlVTzv2w5g08sHdISNNAIK9sfZPdbwZo/2mfBUKqo8DHFy Tvq6CpbeENVTha4VkXsLIfxDfKdj6FGaTWOdRTGWq/PVT9/GeGd9mTDBxOWBBDFRDKUA 6DHYtjvXgKN0ZPvMxO/os5Ap2Tvm47BMitqIWzaFGS6TAf2tiCKtm7XMwB2SdK0QuSNA IczxfEavKY/SjRCQlQdPWuMgwnTcGHSoztHaECmPuAiunwBAQatxyuel19fN0Mgekv9P Pzclg1RlD/E8Q7OWOQbriI1GsOezshrIwcSv7yBfSHR4RTJvXB03mWuU2hLyPVRhONeF RcwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=n5Zf/L1Ldr+2xiw9Kwu6KRYxpXSObQgQm9/K/3DMMSc=; b=sqZIhCYd8ND3f1v09PIR/uXasf8sSYNqZ5SAwRf0WevnILcZ6xN3eBvrAaLm0rYhtW JRipWctVYPdaUi3El+E8P0RDlcphyomYA8uxh43aIV+YDgvxOhiIe7rsVVVFUnQO+tGP dDsNYYNbrzb24EENzVQbQrWvhkMisBz99sZc1O6EUF/usd6f0JAIC1I53urVtKNiyPQX RWOIhVh4juQvHJIWVikm3og9vQwNVAsie3R2Std6GEn07WPai4Awu2vjwEZpaZNwxfyd jkwCr5tvEvw+2q7rfvpAeTz/lhczeExa0IMSMIMhvwaY6zMOZnYLkBY7aUfieL38H5Gh DFRg== 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 s3si8178053ejv.383.2020.09.21.06.13.28; Mon, 21 Sep 2020 06:13:51 -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 S1727614AbgIUNLr (ORCPT + 99 others); Mon, 21 Sep 2020 09:11:47 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13806 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727446AbgIUNKw (ORCPT ); Mon, 21 Sep 2020 09:10:52 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id DE11319AC4F8DDEF2E50; Mon, 21 Sep 2020 21:10:49 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 21:10:39 +0800 From: Qinglang Miao To: Satish Kharat , Sesidhar Baddela , Karan Tilak Kumar , "James E.J. Bottomley" , "Martin K. Petersen" CC: , , "Qinglang Miao" Subject: [PATCH -next] scsi: fnic: simplify the return expression of vnic_cq_alloc() Date: Mon, 21 Sep 2020 21:11:03 +0800 Message-ID: <20200921131103.93132-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Qinglang Miao --- drivers/scsi/fnic/vnic_cq.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/scsi/fnic/vnic_cq.c b/drivers/scsi/fnic/vnic_cq.c index c5db32eda..97f04d3f8 100644 --- a/drivers/scsi/fnic/vnic_cq.c +++ b/drivers/scsi/fnic/vnic_cq.c @@ -31,8 +31,6 @@ void vnic_cq_free(struct vnic_cq *cq) int vnic_cq_alloc(struct vnic_dev *vdev, struct vnic_cq *cq, unsigned int index, unsigned int desc_count, unsigned int desc_size) { - int err; - cq->index = index; cq->vdev = vdev; @@ -42,11 +40,7 @@ int vnic_cq_alloc(struct vnic_dev *vdev, struct vnic_cq *cq, unsigned int index, return -EINVAL; } - err = vnic_dev_alloc_desc_ring(vdev, &cq->ring, desc_count, desc_size); - if (err) - return err; - - return 0; + return vnic_dev_alloc_desc_ring(vdev, &cq->ring, desc_count, desc_size); } void vnic_cq_init(struct vnic_cq *cq, unsigned int flow_control_enable, -- 2.23.0