Skip to content
Commit 11988424 authored by Gavin Shan's avatar Gavin Shan Committed by Will Deacon
Browse files

firmware: arm_sdei: Common block for failing path in sdei_event_create()



There are multiple calls of kfree(event) in the failing path of
sdei_event_create() to free the SDEI event. It means we need to
call it again when adding more code in the failing path. It's
prone to miss doing that and introduce memory leakage.

This introduces common block for failing path in sdei_event_create()
to resolve the issue. This shouldn't cause functional changes.

Signed-off-by: default avatarGavin Shan <gshan@redhat.com>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: default avatarJames Morse <james.morse@arm.com>
Link: https://lore.kernel.org/r/20200922130423.10173-3-gshan@redhat.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 5735f515
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment