[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220609193035.ojzsan6baoqmlaep@mercury.elektranox.org>
Date: Thu, 9 Jun 2022 21:30:35 +0200
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Yang Li <yang.lee@...ux.alibaba.com>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH -next] power: supply: Remove unnecessary print function
dev_err()
Hi,
On Wed, May 04, 2022 at 09:52:14PM +0800, Yang Li wrote:
> The print function dev_err() is redundant because
> platform_get_irq() already prints an error.
>
> Eliminate the follow coccicheck warning:
> ./drivers/power/supply/goldfish_battery.c:225:2-9: line 225 is
> redundant because platform_get_irq() already prints an error
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
> ---
Thanks, queued.
-- Sebastian
> drivers/power/supply/goldfish_battery.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/power/supply/goldfish_battery.c b/drivers/power/supply/goldfish_battery.c
> index bf1754355c9f..a58d713d75ce 100644
> --- a/drivers/power/supply/goldfish_battery.c
> +++ b/drivers/power/supply/goldfish_battery.c
> @@ -221,10 +221,8 @@ static int goldfish_battery_probe(struct platform_device *pdev)
> }
>
> data->irq = platform_get_irq(pdev, 0);
> - if (data->irq < 0) {
> - dev_err(&pdev->dev, "platform_get_irq failed\n");
> + if (data->irq < 0)
> return -ENODEV;
> - }
>
> ret = devm_request_irq(&pdev->dev, data->irq,
> goldfish_battery_interrupt,
> --
> 2.20.1.7.g153144c
>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists