[PATCH v3 39/70] virtio: Fix returning -ENODEV

Simon Glass sjg at chromium.org
Tue Jan 17 18:47:49 CET 2023


This has a special meaning in driver model. There is clearly a device, so
it does not make sense to return this error code. Fix it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 drivers/virtio/virtio-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index 6d9b029390e..a6bff630ca8 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -163,7 +163,7 @@ int virtio_finalize_features(struct udevice *vdev)
 		return ret;
 	if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) {
 		debug("(%s): device refuses features %x\n", vdev->name, status);
-		return -ENODEV;
+		return -EINVAL;
 	}
 
 	return 0;
-- 
2.39.0.246.g2a6d74b583-goog



More information about the U-Boot mailing list