diff options
author | Junhao He <hejunhao2@hisilicon.com> | 2021-05-11 20:27:31 +0800 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-05-25 18:59:23 +0100 |
commit | 27e4482075718997b366e19eaa81aeb7e42e1df3 (patch) | |
tree | 1ef34e0e568f89bba37d99d57d4fcf5432ed0e8a /drivers/perf | |
parent | bf2367aaed73f06a43c0be3c61dafdc59f986161 (diff) |
drivers/perf: arm_spe_pmu: Fix some coding style issues
Fix some coding style issues reported by checkpatch.pl, including
following types:
WARNING: void function return statements are not generally useful
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Junhao He <hejunhao2@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1620736054-58412-2-git-send-email-f.fangjian@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf')
-rw-r--r-- | drivers/perf/arm_spe_pmu.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index 8a1e86ab2d8e..e3711cb4c1b5 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -1044,7 +1044,6 @@ static void __arm_spe_pmu_dev_probe(void *info) spe_pmu->max_record_sz, spe_pmu->align, spe_pmu->features); spe_pmu->features |= SPE_PMU_FEAT_DEV_PROBED; - return; } static void __arm_spe_pmu_reset_local(void) @@ -1190,10 +1189,8 @@ static int arm_spe_pmu_device_probe(struct platform_device *pdev) } spe_pmu = devm_kzalloc(dev, sizeof(*spe_pmu), GFP_KERNEL); - if (!spe_pmu) { - dev_err(dev, "failed to allocate spe_pmu\n"); + if (!spe_pmu) return -ENOMEM; - } spe_pmu->handle = alloc_percpu(typeof(*spe_pmu->handle)); if (!spe_pmu->handle) |