提交 d867bc3a 编写于 作者: Z Zheng Yongjun 提交者: David S. Miller

net: cisco: enic: simplify the return vnic_cq_alloc()

Simplify the return expression.
Signed-off-by: NZheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 dd0e7aab
...@@ -36,8 +36,6 @@ void vnic_cq_free(struct vnic_cq *cq) ...@@ -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, int vnic_cq_alloc(struct vnic_dev *vdev, struct vnic_cq *cq, unsigned int index,
unsigned int desc_count, unsigned int desc_size) unsigned int desc_count, unsigned int desc_size)
{ {
int err;
cq->index = index; cq->index = index;
cq->vdev = vdev; cq->vdev = vdev;
...@@ -47,11 +45,7 @@ int vnic_cq_alloc(struct vnic_dev *vdev, struct vnic_cq *cq, unsigned int index, ...@@ -47,11 +45,7 @@ int vnic_cq_alloc(struct vnic_dev *vdev, struct vnic_cq *cq, unsigned int index,
return -EINVAL; return -EINVAL;
} }
err = vnic_dev_alloc_desc_ring(vdev, &cq->ring, desc_count, desc_size); return vnic_dev_alloc_desc_ring(vdev, &cq->ring, desc_count, desc_size);
if (err)
return err;
return 0;
} }
void vnic_cq_init(struct vnic_cq *cq, unsigned int flow_control_enable, void vnic_cq_init(struct vnic_cq *cq, unsigned int flow_control_enable,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册