drivers/perf: hisi_pcie: Initialize event->cpu only on success
authorYicong Yang <yangyicong@hisilicon.com>
Tue, 24 Oct 2023 09:29:54 +0000 (17:29 +0800)
committerWill Deacon <will@kernel.org>
Tue, 24 Oct 2023 11:30:45 +0000 (12:30 +0100)
commit868f8a709874729998bcad3422124b678b18b755
tree524edb7f54a7cfd666d40e77c3f88010509b2445
parent6d7d51e88e21c0af1ca96a3617afef334bfeffcf
drivers/perf: hisi_pcie: Initialize event->cpu only on success

Initialize the event->cpu only on success. To be more reasonable
and keep consistent with other PMUs.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20231024092954.42297-3-yangyicong@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/hisilicon/hisi_pcie_pmu.c