diff mbox series

power: supply: axp288_charger: Omit superfluous error message

Message ID 20200415042727.13496-1-tangbin@cmss.chinamobile.com (mailing list archive)
State Not Applicable, archived
Headers show
Series power: supply: axp288_charger: Omit superfluous error message | expand

Commit Message

Tang Bin April 15, 2020, 4:27 a.m. UTC
In the axp288_charger_probe(), when get irq failed, the function
platform_get_irq() logs an error message, so remove redundant
message here.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: Shengju Zhang <zhangshengju@cmss.chinamobile.com>
---
 drivers/power/supply/axp288_charger.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Hans de Goede April 15, 2020, 8:07 a.m. UTC | #1
Hi,

On 4/15/20 6:27 AM, Tang Bin wrote:
> In the axp288_charger_probe(), when get irq failed, the function
> platform_get_irq() logs an error message, so remove redundant
> message here.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> Signed-off-by: Shengju Zhang <zhangshengju@cmss.chinamobile.com>

Thank you for this nice cleanup patch:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>   drivers/power/supply/axp288_charger.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/power/supply/axp288_charger.c b/drivers/power/supply/axp288_charger.c
> index 1bbba6bba..16fb4ae1c 100644
> --- a/drivers/power/supply/axp288_charger.c
> +++ b/drivers/power/supply/axp288_charger.c
> @@ -825,10 +825,9 @@ static int axp288_charger_probe(struct platform_device *pdev)
>   	/* Register charger interrupts */
>   	for (i = 0; i < CHRG_INTR_END; i++) {
>   		pirq = platform_get_irq(info->pdev, i);
> -		if (pirq < 0) {
> -			dev_err(&pdev->dev, "Failed to get IRQ: %d\n", pirq);
> +		if (pirq < 0)
>   			return pirq;
> -		}
> +
>   		info->irq[i] = regmap_irq_get_virq(info->regmap_irqc, pirq);
>   		if (info->irq[i] < 0) {
>   			dev_warn(&info->pdev->dev,
>
Tang Bin April 16, 2020, 1:35 a.m. UTC | #2
Hi Hans:

On 2020/4/15 16:07, Hans de Goede wrote:
> Hi,
>
> On 4/15/20 6:27 AM, Tang Bin wrote:
>> In the axp288_charger_probe(), when get irq failed, the function
>> platform_get_irq() logs an error message, so remove redundant
>> message here.
>>
>> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
>> Signed-off-by: Shengju Zhang <zhangshengju@cmss.chinamobile.com>
>
> Thank you for this nice cleanup patch:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>
Thanks,

Tang Bin

>
>
>
>
Sebastian Reichel April 28, 2020, 11:49 p.m. UTC | #3
Hi,

On Wed, Apr 15, 2020 at 10:07:03AM +0200, Hans de Goede wrote:
> Hi,
> 
> On 4/15/20 6:27 AM, Tang Bin wrote:
> > In the axp288_charger_probe(), when get irq failed, the function
> > platform_get_irq() logs an error message, so remove redundant
> > message here.
> > 
> > Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> > Signed-off-by: Shengju Zhang <zhangshengju@cmss.chinamobile.com>
> 
> Thank you for this nice cleanup patch:
> 
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Thanks, queued.

-- Sebastian
diff mbox series

Patch

diff --git a/drivers/power/supply/axp288_charger.c b/drivers/power/supply/axp288_charger.c
index 1bbba6bba..16fb4ae1c 100644
--- a/drivers/power/supply/axp288_charger.c
+++ b/drivers/power/supply/axp288_charger.c
@@ -825,10 +825,9 @@  static int axp288_charger_probe(struct platform_device *pdev)
 	/* Register charger interrupts */
 	for (i = 0; i < CHRG_INTR_END; i++) {
 		pirq = platform_get_irq(info->pdev, i);
-		if (pirq < 0) {
-			dev_err(&pdev->dev, "Failed to get IRQ: %d\n", pirq);
+		if (pirq < 0)
 			return pirq;
-		}
+
 		info->irq[i] = regmap_irq_get_virq(info->regmap_irqc, pirq);
 		if (info->irq[i] < 0) {
 			dev_warn(&info->pdev->dev,