diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2020-07-07 04:12:45 +0200 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-07-17 14:41:42 +0200 |
commit | f90fafecf4880b9785da85feb9b3e6d85fbf2287 (patch) | |
tree | 7c4f85350e577c82e282eebd75717b563048c37f /drivers/irqchip | |
parent | irqchip/irq-bcm7038-l1: Allow building on ARM 32-bit (diff) | |
download | linux-f90fafecf4880b9785da85feb9b3e6d85fbf2287.tar.xz linux-f90fafecf4880b9785da85feb9b3e6d85fbf2287.zip |
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
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/irq-loongson-htpic.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/irqchip/irq-loongson-htpic.c b/drivers/irqchip/irq-loongson-htpic.c index dd018c22ea83..63f72803c8c4 100644 --- a/drivers/irqchip/irq-loongson-htpic.c +++ b/drivers/irqchip/irq-loongson-htpic.c @@ -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) { |