On 3/15/21 4:38 PM, David Marchand wrote:
> On Mon, Mar 15, 2021 at 4:20 PM Maxime Coquelin
> wrote:
>> @@ -604,15 +604,22 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t
>> queue_idx)
>>
>> if (VIRTIO_OPS(hw)->setup_queue(hw, vq) < 0) {
>> PMD_INIT_LOG(ERR, "set
On Mon, Mar 15, 2021 at 4:20 PM Maxime Coquelin
wrote:
> @@ -604,15 +604,22 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t
> queue_idx)
>
> if (VIRTIO_OPS(hw)->setup_queue(hw, vq) < 0) {
> PMD_INIT_LOG(ERR, "setup_queue failed");
> - return -EINVAL;
>
This patch improves the error path of virtio_init_queue(),
by cleaning in reversing order all resources that have
been allocated.
Suggested-by: Chenbo Xia
Signed-off-by: Maxime Coquelin
---
drivers/net/virtio/virtio_ethdev.c | 19 +--
1 file changed, 13 insertions(+), 6 deletion
3 matches
Mail list logo