Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2952986pxk; Mon, 21 Sep 2020 01:04:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjXMqJb8V28nnV+gidSoYTVa1TpD8VJAY4QS8K4WNQ6d8cHXQjnepYUdjVRswwAMcpuWWn X-Received: by 2002:a17:906:f747:: with SMTP id jp7mr46318654ejb.22.1600675494118; Mon, 21 Sep 2020 01:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675494; cv=none; d=google.com; s=arc-20160816; b=SVf80CD70ejHH7H/0HR+GLNjPswjYgpFSQpp5JdnvuKpAIeupWQpAIzjHx5j4LIsYb qMdc9OJrVUSWCeJ7j1WGP4hy6DfCNTydQ2YtAtUWdyS3MckJ9M1iIEUthP0FPCkc/NUr qYq4W9fwemYlR60qfOjXDZDEGv7jjDpGtgFlYYofOZ5A/pwopovLusomSQiZT1PC9oOJ JK6zJCfqTd2+5o/3BlkpuPplJe5WLeoJS/grlPGVXuaewq2NKa1azjQ1TsFVROU+8wvE xVeT9HiEjA3RDo6Y/2rFfEe0O2O/m9RgZb2zdzlsGFZGZUDtGUHNOPmv9rwOw+zGeP/0 sPuw== 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=jitACG/1Q1judXJd9Lq03LLLa1XbY0QBJ4j5bse61/k=; b=W94esjhtBTZIh78Vvo1Ryqm8cizrM0Y6rydyiKxQNNHLgxiasyKZORLQdNtYFFiZOu YekV/DJenh3RHPLrrgxC7FiJG5qjsEJ30bMPU8VSb5B71EmwJlnkrZZmIYS/UU0ieKZ/ U6cYsmCVIXHaOiw+Q6MKj7iBEKTOopw7rPmlE36GTGUpCUxu4nZff1xQUcwziL4ZqRBj clSWc4ynaUaVBPeGr68DFui6GdogUhwIdeEdaE5deFviQPL412IQTDFQ2LY7yPFFLXkW RB/eANOvLfM9Vc91zI9v6wcTnoDywa3n5PImdbnilQXfmZYAUBT3aNK9HMGfwRm7Bjkv JTJw== 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 z18si8343053edm.355.2020.09.21.01.04.31; Mon, 21 Sep 2020 01:04:54 -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 S1726939AbgIUICk (ORCPT + 99 others); Mon, 21 Sep 2020 04:02:40 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:48556 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726644AbgIUICi (ORCPT ); Mon, 21 Sep 2020 04:02:38 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A866F1E292AC08D72B00; Mon, 21 Sep 2020 16:02:35 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:27 +0800 From: Liu Shixin To: Satish Kharat , Sesidhar Baddela , Karan Tilak Kumar , "James E.J. Bottomley" , "Martin K. Petersen" CC: , , Liu Shixin Subject: [PATCH -next] [SCSI] fnic: simplify the return expression of vnic_wq_copy_alloc Date: Mon, 21 Sep 2020 16:24:52 +0800 Message-ID: <20200921082452.2592085-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/fnic/vnic_wq_copy.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/scsi/fnic/vnic_wq_copy.c b/drivers/scsi/fnic/vnic_wq_copy.c index 9eab7e7caf38..7b18635df7e6 100644 --- a/drivers/scsi/fnic/vnic_wq_copy.c +++ b/drivers/scsi/fnic/vnic_wq_copy.c @@ -79,8 +79,6 @@ int vnic_wq_copy_alloc(struct vnic_dev *vdev, struct vnic_wq_copy *wq, unsigned int index, unsigned int desc_count, unsigned int desc_size) { - int err; - wq->index = index; wq->vdev = vdev; wq->to_use_index = wq->to_clean_index = 0; @@ -92,11 +90,7 @@ int vnic_wq_copy_alloc(struct vnic_dev *vdev, struct vnic_wq_copy *wq, vnic_wq_copy_disable(wq); - err = vnic_dev_alloc_desc_ring(vdev, &wq->ring, desc_count, desc_size); - if (err) - return err; - - return 0; + return vnic_dev_alloc_desc_ring(vdev, &wq->ring, desc_count, desc_size); } void vnic_wq_copy_init(struct vnic_wq_copy *wq, unsigned int cq_index, -- 2.25.1