diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-09 17:20:31 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-12-09 17:05:37 -0800 |
commit | d867bc3a269180e4029100a834febddbb8c8228e (patch) | |
tree | f93fd87ce0a871c8b23845691b3188c2e9f4e29d /drivers/net/ethernet/cisco | |
parent | dd0e7aabcad14cf0a97c782737e675a348c11984 (diff) |
net: cisco: enic: simplify the return vnic_cq_alloc()
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cisco')
-rw-r--r-- | drivers/net/ethernet/cisco/enic/vnic_cq.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/ethernet/cisco/enic/vnic_cq.c b/drivers/net/ethernet/cisco/enic/vnic_cq.c index 9c682aff3834..519323460f26 100644 --- a/drivers/net/ethernet/cisco/enic/vnic_cq.c +++ b/drivers/net/ethernet/cisco/enic/vnic_cq.c @@ -36,8 +36,6 @@ void vnic_cq_free(struct vnic_cq *cq) int vnic_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; @@ -47,11 +45,7 @@ int vnic_cq_alloc(struct vnic_dev *vdev, struct vnic_cq *cq, unsigned int index, return -EINVAL; } - err = vnic_dev_alloc_desc_ring(vdev, &cq->ring, desc_count, desc_size); - if (err) - return err; - - return 0; + return vnic_dev_alloc_desc_ring(vdev, &cq->ring, desc_count, desc_size); } void vnic_cq_init(struct vnic_cq *cq, unsigned int flow_control_enable, |