Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2588803rwd; Mon, 15 May 2023 13:59:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4NGOa7EXvVxH9eTIBf3i9JN9D8zx/4tZdbUfLum4UvrtfER7a30EX/7QT5v906Ve8FsuCK X-Received: by 2002:a05:6a20:441b:b0:101:6f3f:638c with SMTP id ce27-20020a056a20441b00b001016f3f638cmr31950495pzb.42.1684184348749; Mon, 15 May 2023 13:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684184348; cv=none; d=google.com; s=arc-20160816; b=BLK5psEnA3g9NYTiKhCSOw5Rv89d1uTNEAvC/4lVeGA6fdD8MzjXg/YSltuiu4k6L0 5lhM8K8xRdctq9wdVEPuhVDXeeQi/7OcU1FGwkkBREnVVva+zRpG0KYyroyJ+H38QCuq PyCTxOtdAL505j9si3ZLy+fNAoA0xlCV6W0wistwhjBpfpqiFkAReV6H8LrWT3HpNiZE szxWzBwqSUlg8iQvqetDZMnM0200z7tc1PFIsAoyYXs/76z5RuInHHLGHdQur9DYkHka 3m/0CWEEvqiUtleMABU6K1eCGEKnhU1N9GSJf5mYkuEEC22BfVW+gxS3XPvLA/0Cr/Ym umCA== 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=TKSF/lfwgAVCV2aNHgxilwAJueAsCarO+7zcnjvdius=; b=b9e0vH+MGsIvgF2l4GRU/+EQQFecknN4Yz4A29HVZRw6TGAE0NXdkriCwE83AvCbLf dH10KGnKYigyxyuE+FuORxgNi4TvCn389qCJG3gDxbTTnJjVquGvG/KERAfteSI+fFQY GpKcMrteg2miYqudrAXmZa0URyiSqYT0ySv71dafBNtaHxZstoZP9bK+WqSdm8/kCvLS Qijx/GRgfI1ZdaHmhCZkvgOv1oNB7HbDMCr0BXO1KIyKalmtsCBxhqcwZR1hlv4ajN+D YROiIQyhmZiaKHYNKw0Z74vsQTRhoN59qKOMlxnCCrNictPs4g3+gdPC1C2rmO7EliV6 LQEg== 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 j5-20020a637a45000000b005186bbfb286si18042833pgn.308.2023.05.15.13.58.55; Mon, 15 May 2023 13:59:08 -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 S245268AbjEOUwR (ORCPT + 99 others); Mon, 15 May 2023 16:52:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231392AbjEOUwQ (ORCPT ); Mon, 15 May 2023 16:52:16 -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 A154D59DA for ; Mon, 15 May 2023 13:52:15 -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 1pyfAm-0005zl-2x; Mon, 15 May 2023 22:52:00 +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 C20C11C5CA7; Mon, 15 May 2023 20:51:58 +0000 (UTC) Date: Mon, 15 May 2023 22:51:58 +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: <20230515-finisher-plating-8ab57747fea5-mkl@pengutronix.de> References: <4b78c848826fde1b8a3ccd53f32b80674812cb12.1684182962.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="e2jyg7v42mrpg4qu" Content-Disposition: inline In-Reply-To: <4b78c848826fde1b8a3ccd53f32b80674812cb12.1684182962.git.christophe.jaillet@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 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 --e2jyg7v42mrpg4qu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 15.05.2023 22:36:28, Christophe JAILLET wrote: > If register_candev() fails, a previous netif_napi_add() needs to be undon= e. > 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 --=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 | --e2jyg7v42mrpg4qu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEDs2BvajyNKlf9TJQvlAcSiqKBOgFAmRim2sACgkQvlAcSiqK BOjuAwf6A4GauV2RYDb0DKtBocZA6JCTFpxr+DJK7LK19G344FjrZMVvb9Tch5iO Z280B9XDtr4dERafr3H5Eu7GxJVOvuI15TM09c1W4Rx5lpo4a7pUYnKrsmu8JAdX 2Jl8DCIF61Pzv+5HnFuefw8e+twXjmD3Htie4zFUVUeZ52Bm60+H5reYeMPxUOcV P27GtPBrEx7N5tJjedlb+E2EqpqLRl3RCNgdpizUBGCoUZqlr7Hv2YXTcyet0SV/ wovJpqmyFDKT3k6r8rXFJuZMp4xBQZibGQJX3f6hYqF7C1QsXcriRUL5h6cRsFCh jnY6LSzFQSrj7ca6rvFv67dmymX+Dw== =WizN -----END PGP SIGNATURE----- --e2jyg7v42mrpg4qu--