]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/perf: arm_pmu: Avoid leaking pmu->irq_affinity on error
authorJulien Grall <julien.grall@arm.com>
Tue, 31 May 2016 11:41:23 +0000 (12:41 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 3 Jun 2016 09:16:21 +0000 (10:16 +0100)
commitb0873f78aaa48f24268ff1cd963174533db4122b
treee8c67f24348f9490a62d24d4125b30a2dae87791
parentfa78f1f0a6725dbd9495c3c96a5ec071dcbd1125
drivers/perf: arm_pmu: Avoid leaking pmu->irq_affinity on error

pmu->irq_affinity will not be freed if an error occurred within
arm_pmu_device_probe after of_pmu_irq_cfg has been called.

Note that in the case of_pmu_irq_cfg is returning an error,
pmu->irq_affinity will not be set, but it should be NULL as pmu was
kzalloc'd. Therefore the result kfree(NULL) is benign.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/perf/arm_pmu.c