Skip to content

Commit 75768e3

Browse files
Zhen LeiMarc Zyngier
authored andcommitted
irqchip/sun4i: Remove unnecessary oom message
Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 76fc40e commit 75768e3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/irqchip/irq-sun4i.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,8 @@ static int __init sun4i_ic_of_init(struct device_node *node,
147147
struct device_node *parent)
148148
{
149149
irq_ic_data = kzalloc(sizeof(struct sun4i_irq_chip_data), GFP_KERNEL);
150-
if (!irq_ic_data) {
151-
pr_err("kzalloc failed!\n");
150+
if (!irq_ic_data)
152151
return -ENOMEM;
153-
}
154152

155153
irq_ic_data->enable_reg_offset = SUN4I_IRQ_ENABLE_REG_OFFSET;
156154
irq_ic_data->mask_reg_offset = SUN4I_IRQ_MASK_REG_OFFSET;
@@ -164,10 +162,8 @@ static int __init suniv_ic_of_init(struct device_node *node,
164162
struct device_node *parent)
165163
{
166164
irq_ic_data = kzalloc(sizeof(struct sun4i_irq_chip_data), GFP_KERNEL);
167-
if (!irq_ic_data) {
168-
pr_err("kzalloc failed!\n");
165+
if (!irq_ic_data)
169166
return -ENOMEM;
170-
}
171167

172168
irq_ic_data->enable_reg_offset = SUNIV_IRQ_ENABLE_REG_OFFSET;
173169
irq_ic_data->mask_reg_offset = SUNIV_IRQ_MASK_REG_OFFSET;

0 commit comments

Comments
 (0)