Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1752458rwd; Wed, 17 May 2023 00:24:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4wGVca6A7uTmNaLmryxrZPcbWBf3104/iTBnOVUjxPOItTPa0JnxbVfdpq+IzHNJ0zo+jx X-Received: by 2002:a17:90a:ba91:b0:24d:f1a5:e279 with SMTP id t17-20020a17090aba9100b0024df1a5e279mr40938865pjr.12.1684308285795; Wed, 17 May 2023 00:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684308285; cv=none; d=google.com; s=arc-20160816; b=jiJlCT4sgcUd57NrJSBpPLUPxY4atukZAkLCEZBRkqZR2xIDQGzwrlAyzVW9W6VNpa f17kPGqwVacHt/AitVmM+eDrKpHjSOCyOFqQ+etAXqCyEWNj8RAb6RNH2plpCVq0+WvI kM8YKDoavFVKIrTYqdAuSqo0o965WqECeMXOA399Es9g9RdEpTXsB/zXnZT6uTc0TioE CTIgMPcgbFb6ixm2xFr55/PTPJlO7X+JSBe3USzPohWgq+4Eu3Pj0ibvXtyQcjUgwnCc UzTLMVptpUsAXLKZlWmWutb1+mw+GKI+QTp0+GoMDe0xRwsHMSQwaFLBImkEYHGPAyJe RECw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=qhMvA2S+cew1VptsZ2aj+HitpHYIcKYfbJIog0GpOf8=; b=ZIrfXGvC90unBQhUNiDgXs2LF3gVYHPPJFKEXpSEjs0t9msRR7hYcj1FAzdeSoVUsb cJZ3y0gklzmT4b02cfy499WFQRmnF4OanhydvQ7ekeMspmxzAM2RyXT3OXgMreTKjD4d 3i8zdcYgAlCQx4+sgZ9foW2T38OFIE1ehMrQ6LGcL9QFE0aTX8Fsvb4ihBah4DvW4R/A g62zrRUQTDiKEILCWCF+7VxUeiLFmjtlSlwt7UjOQHUapmsCqtAdvqSI3QJipgUlTz0g AD4fIaaDaDxnqzTnJd3C9RqFpNVRVyaM8B3WhOEkd3AQhsF7VMSQmSbzFHkD+ThyBmQr 6IxA== ARC-Authentication-Results: i=1; mx.google.com; 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 pi10-20020a17090b1e4a00b0023d23393318si1196034pjb.55.2023.05.17.00.24.33; Wed, 17 May 2023 00:24:45 -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; 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 S229638AbjEQHGT (ORCPT + 99 others); Wed, 17 May 2023 03:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbjEQHGH (ORCPT ); Wed, 17 May 2023 03:06:07 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09DA12D43 for ; Wed, 17 May 2023 00:06:05 -0700 (PDT) Received: from moin.white.stw.pengutronix.de ([2a0a:edc0:0:b01:1d::7b] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pzBEI-0003Y1-5h; Wed, 17 May 2023 09:05:46 +0200 Received: from pengutronix.de (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 23D171C6CDD; Wed, 17 May 2023 07:05:44 +0000 (UTC) Date: Wed, 17 May 2023 09:05:43 +0200 From: Marc Kleine-Budde To: Christophe JAILLET 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 Subject: Re: [PATCH] can: ctucanfd: Fix an error handling path in ctucan_probe_common() Message-ID: <20230517-lugged-wreckage-65f6d28379ac-mkl@pengutronix.de> References: <4b78c848826fde1b8a3ccd53f32b80674812cb12.1684182962.git.christophe.jaillet@wanadoo.fr> <20230515-finisher-plating-8ab57747fea5-mkl@pengutronix.de> <86ff131e-c1d2-ca1f-89a4-37cec62877f4@wanadoo.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cb56oybfxv4tulij" Content-Disposition: inline In-Reply-To: <86ff131e-c1d2-ca1f-89a4-37cec62877f4@wanadoo.fr> X-SA-Exim-Connect-IP: 2a0a:edc0:0:b01:1d::7b X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 --cb56oybfxv4tulij Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 16.05.2023 18:47:17, Christophe JAILLET wrote: > Le 15/05/2023 =C3=A0 22:51, Marc Kleine-Budde a =C3=A9crit=C2=A0: > > On 15.05.2023 22:36:28, Christophe JAILLET wrote: > > > If register_candev() fails, a previous netif_napi_add() needs to be u= ndone. > > > Add the missing netif_napi_del() in the error handling path. > >=20 > > What about this path: > > free_candev(ndev) -> free_netdev() -> netif_napi_del() > >=20 > > | https://elixir.bootlin.com/linux/v6.3.2/source/net/core/dev.c#L10714 > >=20 > > Marc > >=20 >=20 > Ok, thanks for the review, >=20 > so in fact this is the netif_napi_del() call in ctucan_platform_remove() > that can be removed instead. >=20 > Harmless, but would be more consistent. > I'll send a patch for that. Make it so! regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung N=C3=BCrnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | --cb56oybfxv4tulij Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEDs2BvajyNKlf9TJQvlAcSiqKBOgFAmRkfMQACgkQvlAcSiqK BOgosQf/XCnxCLojV+HufFxherLeMBZXjrkGa6+8BZsdUIlbCtcwNnEu9Zg2kSyH dz6D/3L9JPbkedMiJvoExn+Rw5vMPmPLR2+uVwvUIppjZcvCXKTwzRfPx2XqeH4h zlGG+RziMo+yxWI/zE4DIMfuTzcETxkPsceifGxIdkxKJopdXzkojo6/I2bGtjOg ZDbrcrGy7KYHDErY0j0gKgjzsRcR0mP8wrsQJO33VtRuGnUIiOrTWysJlqzU0gt8 nH8a/Se7jgFJ6mNjGChPykhCASUDKNFxtxrSPW0yb2YIUvE2DnhbpDdkJcOFxdaU G/BSiE3NUIIl+xF7oXOAnthhrNCBDQ== =YZRf -----END PGP SIGNATURE----- --cb56oybfxv4tulij--