Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3344857pxv; Sun, 4 Jul 2021 16:08:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL2KcEbFFvfOjmqjKSS8c/L6A/m88JkU2vyuXjx02b7QfyFnCzrGVhWlflqd9ahyxdhwFX X-Received: by 2002:a05:6e02:218c:: with SMTP id j12mr8633729ila.188.1625440082583; Sun, 04 Jul 2021 16:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625440082; cv=none; d=google.com; s=arc-20160816; b=V9GEHagACcLm/tM6cLkDmCZ2K8r4upWX6fdHsUKW3a/YACvdsJdK+/dSpUwsQJvA/X unm7tpPedm8VYVdN3yFnaPVvE1hMXNVwuQtIhV+buc0UX6ThvEkc/cr9kR1duzrgRW02 kzUvsDnCgliSmgGa6XFn46HALqhQgsvgkqoW7kpK+Vn2Fi/jEAz5DczV7orMYEJoFImp P43imzBYV6YqlT0nQa8hAiLJGqM4ci03dbQsEya62d1rcSZJKId/mE1D7aD0BkesX8bW BNYTbc/MoNolnsShRap2jhsoV/9Mcw0AR9ojPw4MHJLZvXnN4Zc//3gNJMZycsBoz0o2 uYaA== 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=1IyZ3wU7cyF+El+OTU1Fr2fwX7kF4LOLasykxgGki60=; b=MYfHcFiqhORtqDWwOpR0yMqJY6HkjyKupWHkQHU4SA2WQFgv0Q75WegeenMdrJe8iv MIUeYkbfx1fjypBVgqXVweODwrA99Bd702MymFfauJlMsk5a6RctGkhkCtEhQn+EjTX7 7Va2+jALRbMPeO456V6Ol13wOnJgFfyLUhqiV/fIDNncM5FqNGA/IIw34Jx6eRAFyDbv ycpY3fCcm6jsJPdZEKfJgCiq8oSO5rSqFwcs1r5hdB+Wxl9bF0jUYFAVVeuODdO75FYm F2ooe/QfuWYtw13c/5ttf5GSlFg/pLT+G5j3vLKhUEaaYgI9w84bLQnNgERs9HxiK9S9 LyAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="fCgQr/5V"; 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 e3si11616000iom.57.2021.07.04.16.07.50; Sun, 04 Jul 2021 16:08:02 -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="fCgQr/5V"; 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 S230367AbhGDXJY (ORCPT + 99 others); Sun, 4 Jul 2021 19:09:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:46340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229740AbhGDXI2 (ORCPT ); Sun, 4 Jul 2021 19:08:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4F5EC611ED; Sun, 4 Jul 2021 23:05:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625439952; bh=GZThXBkEDJrPkBQ6gYuFdb3WkyY1+rD+VFNgn18u+z8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fCgQr/5V/6thl2FbtWFfp1K4lguGpU84+xutcAAw2iRkFwsvisCT+0SFz/RN7kQsJ 4OVJYFMfyIsaEUM6Y6jkC3oEszPNb9VtNmnjjVE9Lg+D94zf2m8jfwnKZOwW3rZ//p nFhX3KOUo2/NvAn2LPlfO/77jDNWKJi+3xBj1oZpQY1Z3BhT31vFjGtdbUGSsPyok6 i7eAY1j21purXaRtcRmEAU0wnFAi52nS1yYm2pn8+fVODBbgDnYg/Q5o6HRLywG7SU FxOGw13Fqj5O2edb5lmnE5n+cUQ3Qtkvt/Gc1BdVjMjWIKgjYMDcBJWWhlc61upm8g 9TxMsg4frkjiw== 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.13 67/85] drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe() Date: Sun, 4 Jul 2021 19:04:02 -0400 Message-Id: <20210704230420.1488358-67-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210704230420.1488358-1-sashal@kernel.org> References: <20210704230420.1488358-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 2bbb93188064..7b87aaf267d5 100644 --- a/drivers/perf/fsl_imx8_ddr_perf.c +++ b/drivers/perf/fsl_imx8_ddr_perf.c @@ -705,8 +705,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