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 <thunder.leizhen@huawei.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210609140828.14584-1-thunder.leizhen@huawei.com
This commit is contained in:
Родитель
944a1a17d3
Коммит
e3f389ed3a
|
@ -316,10 +316,8 @@ static int pdc_intc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
/* Allocate driver data */
|
/* Allocate driver data */
|
||||||
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
||||||
if (!priv) {
|
if (!priv)
|
||||||
dev_err(&pdev->dev, "cannot allocate device data\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
raw_spin_lock_init(&priv->lock);
|
raw_spin_lock_init(&priv->lock);
|
||||||
platform_set_drvdata(pdev, priv);
|
platform_set_drvdata(pdev, priv);
|
||||||
|
|
||||||
|
@ -356,10 +354,8 @@ static int pdc_intc_probe(struct platform_device *pdev)
|
||||||
/* Get peripheral IRQ numbers */
|
/* Get peripheral IRQ numbers */
|
||||||
priv->perip_irqs = devm_kcalloc(&pdev->dev, 4, priv->nr_perips,
|
priv->perip_irqs = devm_kcalloc(&pdev->dev, 4, priv->nr_perips,
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!priv->perip_irqs) {
|
if (!priv->perip_irqs)
|
||||||
dev_err(&pdev->dev, "cannot allocate perip IRQ list\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
for (i = 0; i < priv->nr_perips; ++i) {
|
for (i = 0; i < priv->nr_perips; ++i) {
|
||||||
irq = platform_get_irq(pdev, 1 + i);
|
irq = platform_get_irq(pdev, 1 + i);
|
||||||
if (irq < 0)
|
if (irq < 0)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче