Skip to content

Commit fbb80d5

Browse files
Zhen LeiMarc Zyngier
authored andcommitted
irqchip: Remove redundant error printing
When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Zhen Lei <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5b44955 commit fbb80d5

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

drivers/irqchip/irq-mvebu-icu.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,8 @@ static int mvebu_icu_probe(struct platform_device *pdev)
359359

360360
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
361361
icu->base = devm_ioremap_resource(&pdev->dev, res);
362-
if (IS_ERR(icu->base)) {
363-
dev_err(&pdev->dev, "Failed to map icu base address.\n");
362+
if (IS_ERR(icu->base))
364363
return PTR_ERR(icu->base);
365-
}
366364

367365
/*
368366
* Legacy bindings: ICU is one node with one MSI parent: force manually

drivers/irqchip/irq-mvebu-sei.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,8 @@ static int mvebu_sei_probe(struct platform_device *pdev)
384384

385385
sei->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
386386
sei->base = devm_ioremap_resource(sei->dev, sei->res);
387-
if (IS_ERR(sei->base)) {
388-
dev_err(sei->dev, "Failed to remap SEI resource\n");
387+
if (IS_ERR(sei->base))
389388
return PTR_ERR(sei->base);
390-
}
391389

392390
/* Retrieve the SEI capabilities with the interrupt ranges */
393391
sei->caps = of_device_get_match_data(&pdev->dev);

drivers/irqchip/irq-stm32-exti.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -892,10 +892,8 @@ static int stm32_exti_probe(struct platform_device *pdev)
892892

893893
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
894894
host_data->base = devm_ioremap_resource(dev, res);
895-
if (IS_ERR(host_data->base)) {
896-
dev_err(dev, "Unable to map registers\n");
895+
if (IS_ERR(host_data->base))
897896
return PTR_ERR(host_data->base);
898-
}
899897

900898
for (i = 0; i < drv_data->bank_nr; i++)
901899
stm32_exti_chip_init(host_data, i, np);

0 commit comments

Comments
 (0)