From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E383CD37B4 for ; Wed, 4 Sep 2024 14:28:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+YuivvZRJxt6dop6oazyFT5Xzsn29at/kqlsgNrQWkU=; b=Lx0DD1wNJBCvWh/XhIPCx6iWvt oPS1nVoBT+zIl2WEPy3TIMCCVg40fuZgktxNk/tuJYFPjqI7PYhJgrpygBPbi8S8X6QZqskdTlavk SFVA8piC+ZoKZ0Er0MfHQeyrZ1hpCYPlM9yf4ihF7v99vBXWn2UfYIj9OBGEq9j1r6eCGtAG+68oD anN4ZkXj5YDIuKWA7Ucu9QILI2THBl75VtocLZLJp4sYUR1FPQ8MAchZrbH1CnLZmnzXvnktvawdh eQ+i/Ru5DmgBmpwn3RGoFQvF5ErNWqYtauG2OtMWtH4y5n/APfXp5X0I8lFyKJsKsXRgzM5Azc+Yl VwpbdoKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slqzl-00000004myG-235E; Wed, 04 Sep 2024 14:28:29 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slqwp-00000004mHP-3yZ6; Wed, 04 Sep 2024 14:25:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=+YuivvZRJxt6dop6oazyFT5Xzsn29at/kqlsgNrQWkU=; b=grWgoe2JqiJKodMkB85jz+P4tH 0IYkfYdVvN9rXy+xSlOThG3H1LwnWj2R/MQ7GZST6KO8PFz7tTbKAtDLJb2T45s90K+u6puN1O5m+ DNjfc95U5CJbdVpY9JQDtOqvH0rQ/ItP6oxVyiz1cupmRG658fpxV8rz0zrdMHurBZndgdtawPDCw qAo1DCerL+XtOghCArRAECo9lEYETeDd65aORQ98ThrTa16MqarfKs7SGRUe3i5u/I+ASVTQcPW5i Qvtt6GbLOZ5S5erewu9OXuH2nfGTLVawVjuL4afnzwXVMx0ktgYYTaKfeFFi1D5ArtuDpjpN9d5mK crceS3eg==; Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1slqwm-00000000FJh-1ww3; Wed, 04 Sep 2024 14:25:26 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 8C0C01C000D; Wed, 4 Sep 2024 14:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1725459919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+YuivvZRJxt6dop6oazyFT5Xzsn29at/kqlsgNrQWkU=; b=lJL0a5Sgt9JCOHSCAi9C0XrfihHgt3G7g9Tp2gGDgpMlyrAjdUF/i+AM7EVSD/xuijusSt qUJt/7oqJ+eTj3j6SnyQzD1XvN5oyz/QoFHd0OAqDp4N/45/ucNcajfm6ygPV3XDrK+9ZR fpqdbF4H5QfDyrWRHWf9r5Cp5B4UMiMeaOeFMla5WxhdRlZwERmF/Wje+4pqh5O0VpfMby 5lKw6G0KhGHjAiDYImJ89RWokD2QNfY73ZpsdH+lrQ+E4MkK6sCQW+cnX3wZaJVfDMLurC ZDwv1Gr4UkMe8ossDk4iEdEytNm4KDbNdWaAdCC+rnL5mlmLRO0k1mMwwI2LBg== Date: Wed, 4 Sep 2024 16:25:15 +0200 From: Miquel Raynal To: Pratyush Yadav Cc: Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Michael Walle , , Matthias Brugger , AngeloGioacchino Del Regno , , Thomas Petazzoni Subject: Re: [PATCH next 2/2] mtd: rawnand: mtk: Fix init error path Message-ID: <20240904162515.2af2415d@xps-13> In-Reply-To: References: <20240826153019.67106-1-miquel.raynal@bootlin.com> <20240826153019.67106-2-miquel.raynal@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_152524_656958_1525BCC2 X-CRM114-Status: GOOD ( 13.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Pratyush, pratyush@kernel.org wrote on Wed, 04 Sep 2024 16:08:15 +0200: > On Mon, Aug 26 2024, Miquel Raynal wrote: >=20 > > Reviewing a series converting the for_each_chil_of_node() loops into > > their _scoped variants made me realize there was no cleanup of the > > already registered NAND devices upon error which may leak memory on > > systems with more than a chip when this error occurs. We should call the > > _nand_chips_cleanup() function when this happens. > > > > Fixes: Fixes: 1d6b1e464950 ("mtd: mediatek: driver for MTK Smart Device= ") > > Signed-off-by: Miquel Raynal =20 >=20 > Did a quick scan. Can't see anything (obvious) else being leaked on > error paths. Great! Thanks a lot for the reviews! > Reviewed-by: Pratyush Yadav Cheers, Miqu=C3=A8l