Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp469374rdb; Sat, 16 Dec 2023 17:15:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCGCUkOrTCNvv87639uHeokB3vGGmkryMl5CgYNUCEmOKByjFrS8xJmy2ypThVk5ZaKFlb X-Received: by 2002:a50:8d8b:0:b0:54c:a846:99f9 with SMTP id r11-20020a508d8b000000b0054ca84699f9mr7535483edh.81.1702775721551; Sat, 16 Dec 2023 17:15:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702775721; cv=none; d=google.com; s=arc-20160816; b=FxSMRnaeBGmQhHGdTiFtniAV6ziDNlF3GYUDC3aSj31dN8YvBM5cy0CRhLJCADe0v+ RQB8wRNGXgRsrufamdLvvdLkhX5MBZ3nWKUiu3i5tY0TTqg5nJ2jWfE5111vYa4KAQw2 hliIFiYOiZsfRZYrbrsQHisqKxBMsdTrl2hLrVVdcHJwWRmhtrcP+93MkeE0MFkML9XK 5PCRjYAcIXFWwvtJJPPESRV1ylfYhsZ1utRoUIjHH9300V/GNq+fsA3Hnd2EiW7sfLDI +t272K0qRn8XjtFvz0SMD+cc3UZAQyFtw9R5fyq6D/q5EdeJ6ya6IAkvM+a12HBnepCG NWBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=+jdymlouo2oLdL7TWg09M1pd471V3CkdDnsXRsTkWSk=; fh=1bdWJH1W2/8NEanv/4rXDW9rmV4e9iaa5RCj8eBKV0I=; b=I2W/I3XNWum3QXt986PkrDZy7uR3jT0tUkQ1thdb22rUFXI83oAJ8Bd1CtMrst+E2z OYa0s8rAKyQ7PRL04Jn2sAY16KLGGfAZbeHVj3E7LW87Zji/Cygap3gNu+OmyZeuWJAS lYXoesiI46PfRZSWjdLwn3/mvZLuL8Honngys570tBgWuZ3AOa1uDl0AyyjkjfNbhL+c apDCMz1W9Tkh0YZb3hCpvimL7QLgBgKYzxQzqtTahPTJKCWIFRd0AptYATrfeQsJkXYn molFwHRuDsc5ebUWLT9DBktukedGmhtGVmLiEftJzpFhdvvuVqnrbssJbcKhmTtc4Jqu Rd5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ugdcy0A2; spf=pass (google.com: domain of linux-kernel+bounces-2427-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2427-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dz11-20020a0564021d4b00b0054cdf92b3b5si9121591edb.532.2023.12.16.17.15.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 17:15:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2427-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ugdcy0A2; spf=pass (google.com: domain of linux-kernel+bounces-2427-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2427-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4BDD21F222FD for ; Sun, 17 Dec 2023 01:15:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9FCEA40; Sun, 17 Dec 2023 01:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ugdcy0A2" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08B037F4; Sun, 17 Dec 2023 01:15:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73C23C433C7; Sun, 17 Dec 2023 01:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702775713; bh=+jdymlouo2oLdL7TWg09M1pd471V3CkdDnsXRsTkWSk=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=Ugdcy0A2ov0A0T2b8AUftEEYDfMXAjJBoqxod+VnWlKf7GAoLAIk4Km9djgUGICaN QFRD58aLYm9O7/9qKtbscF8qaYZEoqYjuOy5dZtGogDG9EQPY6ejmayUZHcgSclLzX pygRGLZyBgLhBDRO4UQrhrND/cBkNKXA8fS3IZdZCAg8KdqdnoId660+IfLiPPX7Vx o1GS9TVslLEJ2sUOA4UjyMEiHdiO0ZoqmhSy9JM/yVsJ2E/TquJ692sycSJ2y1KzdP n4cJHMkDqqo7q74G+E/wdBdhClkkMfcx1Whi3Gxh/xIfOuAXEagXV4ee8KKRvCWVjE rw0SGiNEWiCIA== Message-ID: <530a92788ef6763ecb359347a1fcaafb.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20231210175232.3414584-1-visitorckw@gmail.com> References: <20231210175232.3414584-1-visitorckw@gmail.com> Subject: Re: [PATCH] clk: mmp: pxa168: Fix memory leak in pxa168_clk_init() From: Stephen Boyd Cc: duje.mihanovic@skole.hr, conor.dooley@microchip.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Kuan-Wei Chiu To: Kuan-Wei Chiu , mturquette@baylibre.com Date: Sat, 16 Dec 2023 17:15:10 -0800 User-Agent: alot/0.10 Quoting Kuan-Wei Chiu (2023-12-10 09:52:32) > In cases where mapping of mpmu/apmu/apbc registers fails, the code path > does not handle the failure gracefully, potentially leading to a memory > leak. This fix ensures proper cleanup by freeing the allocated memory > for 'pxa_unit' before returning. >=20 > Signed-off-by: Kuan-Wei Chiu > --- Applied to clk-next