Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp685485rdb; Tue, 5 Dec 2023 17:44:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+EELj1COgyhde/QVO6jjMKJapQSj+P5hH+rOuiSUKuEnAXp+cjbOypWUd86BOPTSB16OD X-Received: by 2002:a05:6a20:7d8f:b0:18f:97c:824c with SMTP id v15-20020a056a207d8f00b0018f097c824cmr100099pzj.86.1701827095465; Tue, 05 Dec 2023 17:44:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701827095; cv=none; d=google.com; s=arc-20160816; b=vexwMd5KuuwEvqnuqfKvePhyKN0SzuVH01azesCCRP8rbHFQIISAqpcsmQa70g+0jq HzhqGuXEHcDgD1DujEiY5hyyZHqpJXUhGUxBFVBz5Nzvi3Sou26icGP3sWfWfcW01JUk +dCbdiezSFyXQhSBak3TGJ3OKs9vmm5Rwcd32WbrNAIwWOy371TA1F/NJKICSsKF18E0 eT+fvLSdiLLQ4d+gnw6Zk3ECdVVGikxSCcNm6uvt0OhLeSgGsx04HO4TSQFry3bhz5u/ zNPV7j/jm9Gnw/iDLpMPoPI5tOcmtxnR98HqMKnu6SwnyUkUxv9NzcUG30xp5XSyTIbu 2Knw== 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:dkim-signature; bh=fiKBUbeBJYFLH2mF7fqpBmwh8gCuxIQx3/jXCfN4/Ps=; fh=GrBU9Tquk7Xfe1fcxPSn7jyN5NxlnRqDzpIOMVE5cXM=; b=EzUiE0QEvfEkh+siji/awf1v9LvbjKcU1XAQ56ZAvrgr4G2AX1yiwSxN6Kz7TPRWAP JtVsgcQHEajKw/KEUPMkHhc+EwEY69473ECN8HrU3u/+KhPvDslQiQoEYbB+bMWumDCL WyMgZrTlRBfsLejPGHOwLAWoOccnJry9N0cJsbUiXgyZG+qcNveARCI7+pfhQDj4B4rg MDyMKg86AL8aEn74ZeW3i/YXrd8HSPq3eHIAVtXhRstky99eVp8nw6SPdetc8VHjb3ds DG93d85E5WJh2gr+WulBWa+vklxw/1Dc3QMwEEiJYvbXoqRMj6sFBPoO5HvsFA3gisv+ KrJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NfLDAVsL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u13-20020a17090341cd00b001d0107ee537si1344630ple.428.2023.12.05.17.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 17:44:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NfLDAVsL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A0417802FB88; Tue, 5 Dec 2023 17:44:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235506AbjLFBoi (ORCPT + 99 others); Tue, 5 Dec 2023 20:44:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235302AbjLFBod (ORCPT ); Tue, 5 Dec 2023 20:44:33 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 263C710CB for ; Tue, 5 Dec 2023 17:44:38 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61646C433C7; Wed, 6 Dec 2023 01:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701827077; bh=wpQwyqxs6iklENoKxr6PKDAc6bKDhiqwRadosZHTN5o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NfLDAVsLIEBgeDUXFOjvvrq55JwCjrIfujLhulomKxEQCNbD/oMl1p0DjO89sVXUX V6aYgWjiZaVB1tTbw5bX05t5MCuoHyRQ7wDuQNPx53vfT/AFmlEF2AlUEpunKeQc+H R7ps10K18Ida97oTsdLv5LXqQ1PWNV77/4TKM56PRogBcVjduSM9qAa8rWUlqCpU/w WFxapxhfjTYtbQ3owN/nnT6D+7gZEkgZx1EZnwZPOz8TAyF1F8aSENVfdEyy1LjWvI lNjiS3inI3mmUEkfU0vpf9F45okUTrZaenKJftztDVG7+BkaKs6P1C7vCK2uHTPzke IBMtBiqNfV21A== Date: Wed, 6 Dec 2023 09:44:29 +0800 From: Shawn Guo To: Kunwu Chan Cc: linux@armlinux.org.uk, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, arnd@arndb.de, angus.chen@jaguarmicro.com, u.kleine-koenig@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kunwu.chan@hotmail.com, Ahmad Fatoum Subject: Re: [PATCH v2] ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init Message-ID: <20231206014429.GB236001@dragon> References: <20231122064636.7268-1-chentao@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122064636.7268-1-chentao@kylinos.cn> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 17:44:52 -0800 (PST) On Wed, Nov 22, 2023 at 02:46:36PM +0800, Kunwu Chan wrote: > devm_kasprintf() returns a pointer to dynamically allocated memory > which can be NULL upon failure. Ensure the allocation was successful > by checking the pointer validity. > > Release the id allocated in 'mmdc_pmu_init' when 'devm_kasprintf' > return NULL > > Suggested-by: Ahmad Fatoum > Fixes: e76bdfd7403a ("ARM: imx: Added perf functionality to mmdc driver") > Signed-off-by: Kunwu Chan Applied, thanks!