coresight: etm4x: Make etm4_remove_dev() return void

[ Upstream commit c5f231f1a7 ]

etm4_remove_dev() returned zero unconditionally. Make it return void
instead, which makes it clear in the callers that there is no error to
handle. Simplify etm4_remove_platform_dev() accordingly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20230518201629.260672-1-u.kleine-koenig@pengutronix.de
Stable-dep-of: 348ddab81f ("coresight: etm4x: Remove bogous __exit annotation for some functions")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Uwe Kleine-König 2023-05-18 22:16:29 +02:00 committed by Greg Kroah-Hartman
parent 318a206633
commit 192352bd4b
1 changed files with 3 additions and 6 deletions

View File

@ -2041,7 +2041,7 @@ static void clear_etmdrvdata(void *info)
etmdrvdata[cpu] = NULL;
}
static int __exit etm4_remove_dev(struct etmv4_drvdata *drvdata)
static void __exit etm4_remove_dev(struct etmv4_drvdata *drvdata)
{
etm_perf_symlink(drvdata->csdev, false);
/*
@ -2062,8 +2062,6 @@ static int __exit etm4_remove_dev(struct etmv4_drvdata *drvdata)
cscfg_unregister_csdev(drvdata->csdev);
coresight_unregister(drvdata->csdev);
return 0;
}
static void __exit etm4_remove_amba(struct amba_device *adev)
@ -2076,13 +2074,12 @@ static void __exit etm4_remove_amba(struct amba_device *adev)
static int __exit etm4_remove_platform_dev(struct platform_device *pdev)
{
int ret = 0;
struct etmv4_drvdata *drvdata = dev_get_drvdata(&pdev->dev);
if (drvdata)
ret = etm4_remove_dev(drvdata);
etm4_remove_dev(drvdata);
pm_runtime_disable(&pdev->dev);
return ret;
return 0;
}
static const struct amba_id etm4_ids[] = {