summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2020-09-21 11:24:52 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-10-08 06:50:03 +0300
commit39d0c6e770c2478c33b405b5729289aa1ad37957 (patch)
tree8432b07afb7e9121c5936e92a2b423cc08c3c2b0
parent4b217e015b753c83418cc548acf9fac97961e0a3 (diff)
downloadlinux-39d0c6e770c2478c33b405b5729289aa1ad37957.tar.xz
scsi: fnic: Simplify the return expression of vnic_wq_copy_alloc()
Simplify the return expression. Link: https://lore.kernel.org/r/20200921082452.2592085-1-liushixin2@huawei.com Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/fnic/vnic_wq_copy.c8
1 files changed, 1 insertions, 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,