Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06B2BC47089 for ; Wed, 7 Dec 2022 09:03:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 09115856D1; Wed, 7 Dec 2022 09:56:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="hVo4gsUN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 36FC98569E; Wed, 7 Dec 2022 09:56:17 +0100 (CET) Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4DA8485670 for ; Wed, 7 Dec 2022 09:56:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-pj1-x1030.google.com with SMTP id w15-20020a17090a380f00b0021873113cb4so959525pjb.0 for ; Wed, 07 Dec 2022 00:56:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IbAa2HavDZ+lM9TgNiRF7jy/JSNJmaDn8LsVhphFzb0=; b=hVo4gsUNb69ETBaf8E1bcNbYSb66tAtpJBvHG09ZgS+jlwV19fOrn/HHDU92cy8yHb bMY7v1VZB8aMAeNVhwwUK5izC2yCfmrPFexKXeIZ3aY4AV1RfePya+Opo/QbgV7y319W LcOS58P2nKB9AC4MEz2xcIQCfs+BsSERooYBA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IbAa2HavDZ+lM9TgNiRF7jy/JSNJmaDn8LsVhphFzb0=; b=oTKsl44RAIYFxXIU1ax16qnZr8qwdyFJARmPqhH36GQs7mf0IGx9+wI8G+EAzbYjsq lujI2pf5iPF+2zRFJ4adFcqoFABJ+98YkmnTKNeKlf1/V1OIv392jHagV+4HGkCY9p9z pJmY5X6/z/w6epbq4jEslNZZDnfgu3QUo9eLl6I80TbzmCBH1Z9Lp8BMwsS9JTE76gsU BSzeFK/PYaTW1LXNCLHRsjiqjhCbS8LAz1tm+5thfKRRhLRMdD74eyPG2jB20YWYkG1D GBRlZvpbZ9xL1sFMiEcFEuQ85/SFh4RRt/gWRflDLicjR0aJ361LyH7GS31slazAognf Ccjg== X-Gm-Message-State: ANoB5pl3aWOCO1fOOHB4lTMOIYV+LuMj9S7V92BCfiL/ybbxDX/mKjFB 5z+RE2vqOJW5BCMf0o6l6NGlTzkQ2+iT4+Gd X-Google-Smtp-Source: AA0mqf64d71Gs0rgTHYuLw7LBT0ALS61mZr6XnXGdL38tuklxNP/7+SQnq7Kkv5eWEuNIM9+MnoOcA== X-Received: by 2002:a17:90a:fcf:b0:219:861b:b108 with SMTP id 73-20020a17090a0fcf00b00219861bb108mr27198788pjz.121.1670403373627; Wed, 07 Dec 2022 00:56:13 -0800 (PST) Received: from localhost.localdomain ([27.110.126.54]) by smtp.gmail.com with ESMTPSA id l16-20020a170903121000b0018157b415dbsm14145514plh.63.2022.12.07.00.56.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 00:56:13 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: U-Boot Custodians , Simon Glass , Bin Meng Subject: [PATCH 40/71] virtio: Fix returning -ENODEV Date: Wed, 7 Dec 2022 21:51:06 +1300 Message-Id: <20221207085137.445249-41-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.rc0.267.gcb52ba06e7-goog In-Reply-To: <20221207085137.445249-1-sjg@chromium.org> References: <20221207085137.445249-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean 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 --- 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.rc0.267.gcb52ba06e7-goog