diff mbox series

[-next,SCSI] fnic: simplify the return expression of vnic_wq_copy_alloc

Message ID 20200921082452.2592085-1-liushixin2@huawei.com
State Accepted
Headers show
Series [-next,SCSI] fnic: simplify the return expression of vnic_wq_copy_alloc | expand

Commit Message

Liu Shixin Sept. 21, 2020, 8:24 a.m. UTC
Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/scsi/fnic/vnic_wq_copy.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Martin K. Petersen Oct. 8, 2020, 2:34 a.m. UTC | #1
Liu,

> Simplify the return expression.

Applied to 5.10/scsi-staging, thanks!
Martin K. Petersen Oct. 13, 2020, 10:42 p.m. UTC | #2
On Mon, 21 Sep 2020 16:24:52 +0800, Liu Shixin wrote:

> Simplify the return expression.

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: fnic: Simplify the return expression of vnic_wq_copy_alloc()
      https://git.kernel.org/mkp/scsi/c/39d0c6e770c2
diff mbox series

Patch

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,