In eni_vdpa_request_irq(), the error message for requesting the config
vector IRQ prints the loop index i. However, i is only valid inside the
queue setup loop. At the point of requesting the config IRQ, i has gone
out of scope and does not correspond to any vector, which makes the log
misleading.

Update the error message to print the actual return code ret instead of
the stale i value.

Fixes: e85087beedca ("eni_vdpa: add vDPA driver for Alibaba ENI")
Signed-off-by: Alok Tiwari <[email protected]>
---
 drivers/vdpa/alibaba/eni_vdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vdpa/alibaba/eni_vdpa.c b/drivers/vdpa/alibaba/eni_vdpa.c
index e476504db0c8..e3b20ea7c423 100644
--- a/drivers/vdpa/alibaba/eni_vdpa.c
+++ b/drivers/vdpa/alibaba/eni_vdpa.c
@@ -196,7 +196,7 @@ static int eni_vdpa_request_irq(struct eni_vdpa *eni_vdpa)
        ret = devm_request_irq(&pdev->dev, irq, eni_vdpa_config_handler, 0,
                               eni_vdpa->msix_name, eni_vdpa);
        if (ret) {
-               ENI_ERR(pdev, "failed to request irq for config vq %d\n", i);
+               ENI_ERR(pdev, "failed to request irq for config vector 
ret=%d\n", ret);
                goto err;
        }
        vp_legacy_config_vector(ldev, queues);
-- 
2.50.1


Reply via email to