mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 14:50:19 +00:00
irqchip/loongson-htpic: Remove redundant kfree operation
In the function htpic_of_init(), when kzalloc htpic fails, it should return -ENOMEM directly, no need to execute "goto" to kfree. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/1594087972-21715-2-git-send-email-yangtiezhu@loongson.cn
This commit is contained in:
parent
52b350cbc9
commit
f90fafecf4
@ -93,10 +93,8 @@ int __init htpic_of_init(struct device_node *node, struct device_node *parent)
|
||||
}
|
||||
|
||||
htpic = kzalloc(sizeof(*htpic), GFP_KERNEL);
|
||||
if (!htpic) {
|
||||
err = -ENOMEM;
|
||||
goto out_free;
|
||||
}
|
||||
if (!htpic)
|
||||
return -ENOMEM;
|
||||
|
||||
htpic->base = of_iomap(node, 0);
|
||||
if (!htpic->base) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user