Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: iproc-gpio: Remove redundant error printing in iproc_gpio_probe()

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 <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Link: https://lore.kernel.org/r/20210511085126.4287-1-thunder.leizhen@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Zhen Lei and committed by
Linus Walleij
ef9385fb 0f9facdb

+1 -3
+1 -3
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
··· 813 813 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 814 814 if (res) { 815 815 chip->io_ctrl = devm_ioremap_resource(dev, res); 816 - if (IS_ERR(chip->io_ctrl)) { 817 - dev_err(dev, "unable to map I/O memory\n"); 816 + if (IS_ERR(chip->io_ctrl)) 818 817 return PTR_ERR(chip->io_ctrl); 819 - } 820 818 if (of_device_is_compatible(dev->of_node, 821 819 "brcm,cygnus-ccm-gpio")) 822 820 io_ctrl_type = IOCTRL_TYPE_CDRU;