Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1942472rdb; Thu, 7 Dec 2023 13:14:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEIixRDOSd88NOfrUeE0Ry+2Gx5Jc2K2+6nFJqjIi3SZijH7T9TtAGJ/8uJEkEpfo7z3HvF X-Received: by 2002:a05:6a20:2452:b0:18f:ea5b:6825 with SMTP id t18-20020a056a20245200b0018fea5b6825mr2563648pzc.117.1701983650160; Thu, 07 Dec 2023 13:14:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701983650; cv=none; d=google.com; s=arc-20160816; b=YLzu1qYUtPqYpBTYk1Cm841NKy0YS/VnrdRRn7fnBPVOWqHra6ZraO0DX6+SYL88bk miIZ9LxukueHZ6Li4alatyUl02hos0KZX9PvWt7//1By1k1flMHL0m1x70l9gRkHw6u7 2LTMqKeVq9lJFvzxuRqSLfSaMIaEkO54gQ9hDHhs/qUpZS6N00ISpvgRIRlovCNiDzsM wuMOUulnPDVR0csTZXOEYLnfGUebVeR9Qg6oYVK9ZQ1zVjqqEVMenJT5GQE8CrFQnmj/ NY+z+p3J70UrnvqL5s+fecyOlX8vG09IeLsaAVDA6dRaHqoRH0ijOjFpzN7TlpqYN4w7 xP4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=JnltmePhGEbdAkrEgv3g36oINGYUM5lmCn8S7mA4KXk=; fh=etCN19PYp9ULzQ+BLWES7KoL7AjFYuRfDDMW4NQxQjM=; b=cgIB/QBxz4dbDsm4aw7x/2sqQGQdwOHz4AJWq3Ha8Rwb5HGcWs4oG6IixlXOjiNMZc bX9ZJ9lc7ZxgEnDk1qNTe+dNB/voO3bPN7jdmHtm40jjPYWG4OR2uI9tlRJ7hk42dq+R OukJI04Zwh7BnkvC+ORrP+UC1xYWZFq32kV0/v3z9aFd2GdZv9CyR4SErbWPC1Z8hJ/L AmIQ1y76Mulywo/Zohp1ihJQ/T8g80pU89wKXEBWmFcilrnVZvoWnP0nyBctZKSQVZr4 Z+4qgyKMlds4S4HXhwEl23F4g9ilGmOCqZ3grIZgsQKi51Hf/YoeOMfaL15ZR5g8gI2K 4Ofw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=eoU0XRzH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c4-20020a63ef44000000b005c5fe04e4eesi282597pgk.852.2023.12.07.13.14.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 13:14:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=eoU0XRzH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 849F8801CE8A; Thu, 7 Dec 2023 13:14:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443925AbjLGVNw (ORCPT + 99 others); Thu, 7 Dec 2023 16:13:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231461AbjLGVNu (ORCPT ); Thu, 7 Dec 2023 16:13:50 -0500 Received: from smtp.smtpout.orange.fr (smtp-23.smtpout.orange.fr [80.12.242.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C83D01715 for ; Thu, 7 Dec 2023 13:13:55 -0800 (PST) Received: from [192.168.1.18] ([92.140.202.140]) by smtp.orange.fr with ESMTPA id BLgtrBr3hMO0QBLgtrRMmD; Thu, 07 Dec 2023 22:13:54 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1701983634; bh=JnltmePhGEbdAkrEgv3g36oINGYUM5lmCn8S7mA4KXk=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=eoU0XRzH9tVdA0RymcgDqEHkccEylBESxl10B/20sw3t8Y3RRBfD51BTQWG3YEDGl SdGsPMgNs/9E4rdkSnpPuguZzjq6iJManwx6fUhFU9JSSYwZwIfpS0gBR7oTxbywMB kFWqH9G9pHNrcvKFIe/zJ/d/olyN2VNe8FdmRJNBTg20bLsIZaod9P+p8Aa1kPV6Mc ptkKHcDRMPn+9KUBNRyAxs0uKnOqdbjuUGZd5/vABuIf5qoCokut9xtAkQFtkGTfXz 572wKuiQQyeKUCCB6TtsywSiebOWHHON8MV6sj08BFNj/z5/JH+4P9i2WEh/+1LhBi ex/hHSb/AA4ZA== X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 07 Dec 2023 22:13:54 +0100 X-ME-IP: 92.140.202.140 Message-ID: <72a89724-9dad-499a-a0ed-ad9d046d235d@wanadoo.fr> Date: Thu, 7 Dec 2023 22:13:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] vdpa: Fix an error handling path in eni_vdpa_probe() Content-Language: fr To: "Michael S. Tsirkin" , Jason Wang , Wu Zongyong , Arnd Bergmann Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, virtualization@lists.linux-foundation.org References: From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 07 Dec 2023 13:14:07 -0800 (PST) Le 20/10/2022 à 21:21, Christophe JAILLET a écrit : > After a successful vp_legacy_probe() call, vp_legacy_remove() should be > called in the error handling path, as already done in the remove function. > > Add the missing call. > > Fixes: e85087beedca ("eni_vdpa: add vDPA driver for Alibaba ENI") > Signed-off-by: Christophe JAILLET > --- > drivers/vdpa/alibaba/eni_vdpa.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/vdpa/alibaba/eni_vdpa.c b/drivers/vdpa/alibaba/eni_vdpa.c > index 5a09a09cca70..cce3d1837104 100644 > --- a/drivers/vdpa/alibaba/eni_vdpa.c > +++ b/drivers/vdpa/alibaba/eni_vdpa.c > @@ -497,7 +497,7 @@ static int eni_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id) > if (!eni_vdpa->vring) { > ret = -ENOMEM; > ENI_ERR(pdev, "failed to allocate virtqueues\n"); > - goto err; > + goto err_remove_vp_legacy; > } > > for (i = 0; i < eni_vdpa->queues; i++) { > @@ -509,11 +509,13 @@ static int eni_vdpa_probe(struct pci_dev *pdev, const struct pci_device_id *id) > ret = vdpa_register_device(&eni_vdpa->vdpa, eni_vdpa->queues); > if (ret) { > ENI_ERR(pdev, "failed to register to vdpa bus\n"); > - goto err; > + goto err_remove_vp_legacy; > } > > return 0; > > +err_remove_vp_legacy: > + vp_legacy_remove(&eni_vdpa->ldev); > err: > put_device(&eni_vdpa->vdpa.dev); > return ret; Polite reminder on a (very) old patch. CJ