Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp971065rwd; Tue, 16 May 2023 09:59:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7TrtirwOY5+XjgVhBhaBNq0W8SoPTAND+owrvXVQ2HLCkqUmSRzjUs3Pb4sa69hbf9dcwB X-Received: by 2002:a05:6a00:cca:b0:63d:5de3:b3f2 with SMTP id b10-20020a056a000cca00b0063d5de3b3f2mr54519942pfv.18.1684256358691; Tue, 16 May 2023 09:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684256358; cv=none; d=google.com; s=arc-20160816; b=cZNgm2Z/+I4H7Q57EL+NOZkX3SMpMcgoBgh9ZxwMTUkI6pChnUpMq4NKULiGwfJwEC R/UEMrVpZL+C7bvonVoAkk4R4hvtHQKY6XUC2+jIrboCEcjjB3TGWXhse+OEPgE8oyiU wfG1aypVgPGxRV6JdJ5flmXfMUBTocpEiaV6aaw28IaeGbgX7FxPgjckrDnpOkLD9iMF /3Ea95sH73m0CqQy+FQYsH/J4cpgldcdB0J4aDgs6+Y1kOzF1U6PIy/H4aY0CrurRURJ /rknJhca48U55+0guUs0lGM/8MPZZvN6n+Cw2n62X6iYOhm4c7rBcCHjXvJMWxs8e4ci PMwA== 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=7CfQRDvvwjhMVgiqSklBjw+t8X5eImK79qbg+xMooIA=; b=iivRU1KfF6VG8LKk06p1YNgU8EWXcigusJTn1SbhUnqOb7SVUafY1lucIaMTZaWFpl sH6uQkqgnBS+T0KSm5mC7zqfWn++1EgGMiQAryFMZ7swkc8DR7fKb11F06xxu4JVJFh8 1MS1lc8afNLJeGm+PXFAQeWu5MnMOQXt1h3Y6m5Wiuo5qhdRsXGc1XPHA4FCuL/oScwk qZuwXvtMklhNIKQ+xzbfpHhLfqgwqazx6Ff6Ttvj0ttcIQ8ecztDq+g1rtUC6mIc9DpR 7eetio33RZrFOy07V4LKfu+3gfoVVlsFibFMC+zsStAbjAj32NkHmsOdacLkktEytJkJ N4oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=gUAxXW2E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020a637243000000b00517d81adf00si20072735pgn.624.2023.05.16.09.59.06; Tue, 16 May 2023 09:59:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=gUAxXW2E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbjEPQr1 (ORCPT + 99 others); Tue, 16 May 2023 12:47:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbjEPQr0 (ORCPT ); Tue, 16 May 2023 12:47:26 -0400 Received: from smtp.smtpout.orange.fr (smtp-17.smtpout.orange.fr [80.12.242.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6522D40E7 for ; Tue, 16 May 2023 09:47:24 -0700 (PDT) Received: from [192.168.1.18] ([86.243.2.178]) by smtp.orange.fr with ESMTPA id yxpWppJUeNhDHyxpWpID6D; Tue, 16 May 2023 18:47:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1684255641; bh=7CfQRDvvwjhMVgiqSklBjw+t8X5eImK79qbg+xMooIA=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=gUAxXW2E6dmUuYm6M0lQ0IvcXGTXAODy0RjazM/n9+9ZhGnKt2+diSTFSaq53JssM NUNkEsLxOK4tsTp3qZxTHbOdUVRWZSvYGyHIsIWhCz4/B386m8wwwBY21tbxgE8Om+ fzcG6Y1MV0lRs0bafoUEVSJLrnZRkvNKRc1JCPIv7r5z65ctkiXF8XDeyQRlQfr9EY RGqIHF+KZxKXDgNB/WkSxDLZ22Xwn/5wJ1E6rULf+8SLGHPHe8alPS2jINeCcTQXHk eEPEF3RQSnfPWQI+rL/tXpYpMhnvPBoMo81YXTKOYIgisZbLTdadm6b5qQJqbs7fVO MnFnVogKAHJpw== X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 16 May 2023 18:47:21 +0200 X-ME-IP: 86.243.2.178 Message-ID: <86ff131e-c1d2-ca1f-89a4-37cec62877f4@wanadoo.fr> Date: Tue, 16 May 2023 18:47:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] can: ctucanfd: Fix an error handling path in ctucan_probe_common() Content-Language: fr, en-GB To: Marc Kleine-Budde Cc: Pavel Pisa , Ondrej Ille , Wolfgang Grandegger , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Martin Jerabek , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-can@vger.kernel.org, netdev@vger.kernel.org References: <4b78c848826fde1b8a3ccd53f32b80674812cb12.1684182962.git.christophe.jaillet@wanadoo.fr> <20230515-finisher-plating-8ab57747fea5-mkl@pengutronix.de> From: Christophe JAILLET In-Reply-To: <20230515-finisher-plating-8ab57747fea5-mkl@pengutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 15/05/2023 à 22:51, Marc Kleine-Budde a écrit : > On 15.05.2023 22:36:28, Christophe JAILLET wrote: >> If register_candev() fails, a previous netif_napi_add() needs to be undone. >> Add the missing netif_napi_del() in the error handling path. > > What about this path: > free_candev(ndev) -> free_netdev() -> netif_napi_del() > > | https://elixir.bootlin.com/linux/v6.3.2/source/net/core/dev.c#L10714 > > Marc > Ok, thanks for the review, so in fact this is the netif_napi_del() call in ctucan_platform_remove() that can be removed instead. Harmless, but would be more consistent. I'll send a patch for that. CJ