fnic: simplify the return expression of vnic_wq_copy_alloc
Subsystems (2)
PATCH 1/1 fnic: simplify the return expression of vnic_wq_copy_alloc
Simplify the return expression.
Signed-off-by Liu Shixin <[email protected]>
--- drivers/scsi/fnic/vnic_wq_copy.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/scsi/fnic/vnic_wq_copy.c +1 -7
@@ -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,
Signature · 1 line
2.25.1
Martin K. Petersen
AppliedLiu,
Quoted 1 line
Simplify the return expression.
Applied to 5.10/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 1 line · Liu Shixin
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
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering