Skip to content

Commit e3f389e

Browse files
Zhen LeiMarc Zyngier
authored andcommitted
irqchip/imgpdc: 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 944a1a1 commit e3f389e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/irqchip/irq-imgpdc.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,8 @@ static int pdc_intc_probe(struct platform_device *pdev)
316316

317317
/* Allocate driver data */
318318
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
319-
if (!priv) {
320-
dev_err(&pdev->dev, "cannot allocate device data\n");
319+
if (!priv)
321320
return -ENOMEM;
322-
}
323321
raw_spin_lock_init(&priv->lock);
324322
platform_set_drvdata(pdev, priv);
325323

@@ -356,10 +354,8 @@ static int pdc_intc_probe(struct platform_device *pdev)
356354
/* Get peripheral IRQ numbers */
357355
priv->perip_irqs = devm_kcalloc(&pdev->dev, 4, priv->nr_perips,
358356
GFP_KERNEL);
359-
if (!priv->perip_irqs) {
360-
dev_err(&pdev->dev, "cannot allocate perip IRQ list\n");
357+
if (!priv->perip_irqs)
361358
return -ENOMEM;
362-
}
363359
for (i = 0; i < priv->nr_perips; ++i) {
364360
irq = platform_get_irq(pdev, 1 + i);
365361
if (irq < 0)

0 commit comments

Comments
 (0)