Skip to content

Commit c5f231f

Browse files
Uwe Kleine-KönigSuzuki K Poulose
authored andcommitted
coresight: etm4x: Make etm4_remove_dev() return void
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
1 parent 9f37d37 commit c5f231f

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

drivers/hwtracing/coresight/coresight-etm4x-core.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,7 @@ static void clear_etmdrvdata(void *info)
21902190
per_cpu(delayed_probe, cpu) = NULL;
21912191
}
21922192

2193-
static int __exit etm4_remove_dev(struct etmv4_drvdata *drvdata)
2193+
static void __exit etm4_remove_dev(struct etmv4_drvdata *drvdata)
21942194
{
21952195
bool had_delayed_probe;
21962196
/*
@@ -2217,8 +2217,6 @@ static int __exit etm4_remove_dev(struct etmv4_drvdata *drvdata)
22172217
cscfg_unregister_csdev(drvdata->csdev);
22182218
coresight_unregister(drvdata->csdev);
22192219
}
2220-
2221-
return 0;
22222220
}
22232221

22242222
static void __exit etm4_remove_amba(struct amba_device *adev)
@@ -2231,13 +2229,12 @@ static void __exit etm4_remove_amba(struct amba_device *adev)
22312229

22322230
static int __exit etm4_remove_platform_dev(struct platform_device *pdev)
22332231
{
2234-
int ret = 0;
22352232
struct etmv4_drvdata *drvdata = dev_get_drvdata(&pdev->dev);
22362233

22372234
if (drvdata)
2238-
ret = etm4_remove_dev(drvdata);
2235+
etm4_remove_dev(drvdata);
22392236
pm_runtime_disable(&pdev->dev);
2240-
return ret;
2237+
return 0;
22412238
}
22422239

22432240
static const struct amba_id etm4_ids[] = {

0 commit comments

Comments
 (0)