Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3345994pxv; Sun, 4 Jul 2021 16:10:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzn7gwxWv1X2QBeYYPJ9w9tqR3gAnq+noAHbY20wqPOuyB1KD0tyZi92lcAg2QAUX/jhbF X-Received: by 2002:a05:6638:348c:: with SMTP id t12mr5067434jal.1.1625440215380; Sun, 04 Jul 2021 16:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625440215; cv=none; d=google.com; s=arc-20160816; b=z1HEGQynEMwkMXE+N0waZbmlNFmwq6mdoJIGpGXon+/1m7R2TeVsQlIXVAKhX50/xQ vOSV+XqtYsjfHHAzdF0Ib2h8okGNMn/efCqMuSyi0Fok2ArsS3FU/H88hsoqX0Zv0ClV 8Mn9FHqw+0W40Ipbrv7229sBPr6GVVgzb/+WWu9clodrLeiUNzR+wn4eon/BxJAuqzWt oqtDB8ggUSRGbJe657ch/JxTFOyUtF19PRtbKNCYW7Oo7abtoI6q/XnnTrkSmCA3/Qu3 gT35d41T+yAU28o02ChZY5fO72afOGS/sJX9AhzCy7JjVKvYZ7zN/rPOUEuKBLwhmvps pBug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eqVXmObeaktkyYfkzblZobxRXIQfJePhb0S2+HHKmuc=; b=dUCmA8qtiSfZh4yH5Jj3B345O/0w7BXt3mNzB+czZUNGoT2gQlwiYa0f10jeHW2Hwz SagB4p9GuUAmq2pBt1oWUVyZinf2/jofRO4Bae9kiCT+7zXHrC4szqa/R+n2fD2e9HTJ a8Gqbio6G/qSBtEOYoCXPDbgn5VzRKEgtgiAoCutIx8wOcNp4xg+5fxKf21yfJWHOEYq WMU3wY1xeJ0XZExn0FKuzohVw7DM7ST6meWIzLPgmcO57bJ5J2sHKtzjMhLvL4/6pTJn eteX3/Jsruc0xgpBIlt9Co9lXd3AOGn4E4t7PTKqL7VqKgFXQcgpOkx/pOF5nC7IDYQt 0AbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UMis4a6S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t2si11464231ilf.48.2021.07.04.16.10.03; Sun, 04 Jul 2021 16:10:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UMis4a6S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbhGDXMH (ORCPT + 99 others); Sun, 4 Jul 2021 19:12:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:50660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232404AbhGDXKR (ORCPT ); Sun, 4 Jul 2021 19:10:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4DF606135D; Sun, 4 Jul 2021 23:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625440061; bh=hvrLauVFWh743EloqAaqUKrqb2UFuN2LrjXSfW90LLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UMis4a6Su3JwDKqH6JjN4sM6TTX1GWPneXMS7XLVPCbxX7GcIpHHtyaxN0Dxgnotf Q6Ufh4LncEHhZH5DSzMtz682gBgrN0lI3Q6xSIz2XvfBh5f6BE5UyFHQHFx4lSJzQZ xK+whfrIOg/DJ5NllWccZLx78dAEgVlXDbSFlFYU2RkLvbtdXLLYO8mlkQgchc6cql eigZAikjoUo3BpGBxny3j59pJ3EGOMc/R38TnMgn5bx8ui/6fGDUpYrYGZ6XnbXFLF LWy+9NBWuhT7kSh15qL5q7TVQSQ8H85D1pwGvnwtSMD180JxsYWDtkzNN6ooBgH188 ijPQi3KJH5vpA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jing Xiangfeng , Dong Aisheng , Will Deacon , Sasha Levin , linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.12 63/80] drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe() Date: Sun, 4 Jul 2021 19:05:59 -0400 Message-Id: <20210704230616.1489200-63-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210704230616.1489200-1-sashal@kernel.org> References: <20210704230616.1489200-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jing Xiangfeng [ Upstream commit d96b1b8c9f79b6bb234a31c80972a6f422079376 ] ddr_perf_probe() misses to call ida_simple_remove() in an error path. Jump to cpuhp_state_err to fix it. Signed-off-by: Jing Xiangfeng Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/20210617122614.166823-1-jingxiangfeng@huawei.com Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- drivers/perf/fsl_imx8_ddr_perf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/perf/fsl_imx8_ddr_perf.c b/drivers/perf/fsl_imx8_ddr_perf.c index be1f26b62ddb..4a56849f0400 100644 --- a/drivers/perf/fsl_imx8_ddr_perf.c +++ b/drivers/perf/fsl_imx8_ddr_perf.c @@ -706,8 +706,10 @@ static int ddr_perf_probe(struct platform_device *pdev) name = devm_kasprintf(&pdev->dev, GFP_KERNEL, DDR_PERF_DEV_NAME "%d", num); - if (!name) - return -ENOMEM; + if (!name) { + ret = -ENOMEM; + goto cpuhp_state_err; + } pmu->devtype_data = of_device_get_match_data(&pdev->dev); -- 2.30.2