[-next] misc: hi6421-spmi-pmic: Remove redundant dev_err()

Message ID 20230726170644.2474917-1-ruanjinjie@huawei.com
State New
Headers
Series [-next] misc: hi6421-spmi-pmic: Remove redundant dev_err() |

Commit Message

Jinjie Ruan July 26, 2023, 5:06 p.m. UTC
  There is no need to call the dev_err() function directly to print a custom
message when handling an error from the platform_get_irq() functions as it
going to display an appropriate error message in case of a failure.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 drivers/misc/hi6421v600-irq.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Greg KH July 26, 2023, 9:42 a.m. UTC | #1
On Wed, Jul 26, 2023 at 05:06:44PM +0000, Ruan Jinjie wrote:
> There is no need to call the dev_err() function directly to print a custom
> message when handling an error from the platform_get_irq() functions as it
> going to display an appropriate error message in case of a failure.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> ---
>  drivers/misc/hi6421v600-irq.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c
> index caa3de37698b..e5ed94e98a3c 100644
> --- a/drivers/misc/hi6421v600-irq.c
> +++ b/drivers/misc/hi6421v600-irq.c
> @@ -245,7 +245,6 @@ static int hi6421v600_irq_probe(struct platform_device *pdev)
>  
>  	priv->irq = platform_get_irq(pmic_pdev, 0);
>  	if (priv->irq < 0) {
> -		dev_err(dev, "Error %d when getting IRQs\n", priv->irq);
>  		return priv->irq;
>  	}

It's good not to add coding style errors when trying to fix up a
different type of issue :(
  
Jinjie Ruan July 26, 2023, 9:49 a.m. UTC | #2
On 2023/7/26 17:42, Greg KH wrote:
> On Wed, Jul 26, 2023 at 05:06:44PM +0000, Ruan Jinjie wrote:
>> There is no need to call the dev_err() function directly to print a custom
>> message when handling an error from the platform_get_irq() functions as it
>> going to display an appropriate error message in case of a failure.
>>
>> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
>> ---
>>  drivers/misc/hi6421v600-irq.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c
>> index caa3de37698b..e5ed94e98a3c 100644
>> --- a/drivers/misc/hi6421v600-irq.c
>> +++ b/drivers/misc/hi6421v600-irq.c
>> @@ -245,7 +245,6 @@ static int hi6421v600_irq_probe(struct platform_device *pdev)
>>  
>>  	priv->irq = platform_get_irq(pmic_pdev, 0);
>>  	if (priv->irq < 0) {
>> -		dev_err(dev, "Error %d when getting IRQs\n", priv->irq);
>>  		return priv->irq;
>>  	}
> 
> It's good not to add coding style errors when trying to fix up a
> different type of issue :(

I'll fix the coding style error in v2, thank you!
  

Patch

diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c
index caa3de37698b..e5ed94e98a3c 100644
--- a/drivers/misc/hi6421v600-irq.c
+++ b/drivers/misc/hi6421v600-irq.c
@@ -245,7 +245,6 @@  static int hi6421v600_irq_probe(struct platform_device *pdev)
 
 	priv->irq = platform_get_irq(pmic_pdev, 0);
 	if (priv->irq < 0) {
-		dev_err(dev, "Error %d when getting IRQs\n", priv->irq);
 		return priv->irq;
 	}