summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2020-09-21 16:24:55 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2020-10-07 23:50:03 -0400
commit6afc12fa6e503670939f75e4bd3f1777401ffb99 (patch)
treefed6daa86db4c96f3a4d85195db741d2bb95bced /drivers/scsi
parent39d0c6e770c2478c33b405b5729289aa1ad37957 (diff)
downloadlinux-6afc12fa6e503670939f75e4bd3f1777401ffb99.tar.gz
linux-6afc12fa6e503670939f75e4bd3f1777401ffb99.tar.bz2
linux-6afc12fa6e503670939f75e4bd3f1777401ffb99.zip
scsi: snic: Simplify the return expression of svnic_cq_alloc()
Simplify the return expression. Link: https://lore.kernel.org/r/20200921082455.2592190-1-liushixin2@huawei.com Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/snic/vnic_cq.c8
1 files changed, 1 insertions, 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,