Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2953267pxk; Mon, 21 Sep 2020 01:05:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyamUQv5rjFHvNOHYaiO0B4i7opU4FvqLRG/W0H3vkpO1LByXdCFWdqy/5PxTSspiBDENpU X-Received: by 2002:a17:906:3ca2:: with SMTP id b2mr49958380ejh.460.1600675523756; Mon, 21 Sep 2020 01:05:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675523; cv=none; d=google.com; s=arc-20160816; b=zDmsUbEyEl8Igqu+o865aqBHvbED55NX8ie4mNIJ6piSsIuefnzkiLSZv8BtK9uKfU oXQA3fdU5t3TIAeB89HS4i1agaZQmxM+iBcA/Ty7iZTji6gv8a2UrVYwpTZ1YvWmtCDA z8Z4t7JYhBDge9EdFiIbdN3AclRZ/Ol7/iZDcCG57qac+pLmI9+fbXpfCm6EeTV6AYQ8 B3kGeygHLFryYbhIJTkIMgcT2IRIRDQYHz5sBP0VwWmSW5XEn+5Jfzs7tOIzOB03dteq fbAULt16agn7WPNYXCn9p58ROx0cpHkxzkmZJdaqZX14T7vUCrcrUcVVBZj3qK2T44bx +JHg== 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=3LvBEcvK+TAhlijReePhr1f3VquXuDtPMNP+KdZzV28=; b=Rtj6My7T0NsyTRdgGDAWII+Wu/ajPivxvbWym/BIY6Rmd2kyfONE5gq5WBFOyG167c VFLCCWve07PVLEUIQIeh3ZHYfjyKMvkjNxWUm7d+jeA7htjNA44KgO+usLj6EpxVAlLq lSner4TkmEMy/HFfDHvcrgac1r5d2bPOhwedsDusq5/Bu0Bel7qLMV/KZxQINLciQfUE oEj3IiI4AY6Ui7x9M5aAbl9suu7I4m/4lo2M6SiI3K3x/Hn9bA7pn493qZLvScxIHhTJ lirG7KVOT0iKf6u97L++mXjy6MYUYYzEVfGgwQ1Sfvms5FcDdj4WI+UaXXyBTTkwV2zb 2J/A== 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 cx12si9386836edb.298.2020.09.21.01.05.01; Mon, 21 Sep 2020 01:05:23 -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 S1726993AbgIUIDE (ORCPT + 99 others); Mon, 21 Sep 2020 04:03:04 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13744 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726934AbgIUICm (ORCPT ); Mon, 21 Sep 2020 04:02:42 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id EAC8F36642FD99D8F596; Mon, 21 Sep 2020 16:02:39 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:30 +0800 From: Liu Shixin To: Karan Tilak Kumar , Sesidhar Baddela , "James E.J. Bottomley" , "Martin K. Petersen" CC: , , Liu Shixin Subject: [PATCH -next] snic: simplify the return expression of svnic_cq_alloc Date: Mon, 21 Sep 2020 16:24:55 +0800 Message-ID: <20200921082455.2592190-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/scsi/snic/vnic_cq.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/scsi/snic/vnic_cq.c b/drivers/scsi/snic/vnic_cq.c index 4c8e64e4fba6..3455dd7e73f4 100644 --- a/drivers/scsi/snic/vnic_cq.c +++ b/drivers/scsi/snic/vnic_cq.c @@ -31,8 +31,6 @@ void svnic_cq_free(struct vnic_cq *cq) int svnic_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; @@ -43,11 +41,7 @@ int svnic_cq_alloc(struct vnic_dev *vdev, struct vnic_cq *cq, return -EINVAL; } - err = svnic_dev_alloc_desc_ring(vdev, &cq->ring, desc_count, desc_size); - if (err) - return err; - - return 0; + return svnic_dev_alloc_desc_ring(vdev, &cq->ring, desc_count, desc_size); } void svnic_cq_init(struct vnic_cq *cq, unsigned int flow_control_enable, -- 2.25.1