vdpa: solidrun: Free IRQs after request failure

Unwind IRQs already requested by snet_request_irqs() before returning a
VQ IRQ request error so a later DRIVER_OK retry starts from a clean
state. The IRQs are requested and freed while the PCI device remains
bound, so the driver cannot wait for devres cleanup at detach time.

Fixes: 51a8f9d7f5 ("virtio: vdpa: new SolidNET DPU driver.")
Cc: stable@vger.kernel.org # v6.3+
Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <178589471328.1556376.15570536900532373521@kylinos.cn>
This commit is contained in:
Xiong Weimin 2026-08-05 09:51:53 +08:00 committed by Michael S. Tsirkin
parent 9ab9b4f4eb
commit e847542ab0

View File

@ -418,11 +418,15 @@ static int snet_request_irqs(struct pci_dev *pdev, struct snet *snet)
snet->vqs[i]->irq_name, snet->vqs[i]);
if (ret) {
SNET_ERR(pdev, "Failed to request IRQ\n");
return ret;
goto err_free_irqs;
}
snet->vqs[i]->irq = irq;
}
return 0;
err_free_irqs:
snet_free_irqs(snet);
return ret;
}
static void snet_set_status(struct vdpa_device *vdev, u8 status)