power: supply: rk817: Simplify an error message

Message ID a9c0820c5af6b315ef3b3c2fd8d7be44008b0086.1681577370.git.christophe.jaillet@wanadoo.fr
State New
Headers
Series power: supply: rk817: Simplify an error message |

Commit Message

Christophe JAILLET April 15, 2023, 4:49 p.m. UTC
  dev_err_probe() already display the error code. There is no need to
duplicate it explicitly in the error message.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/power/supply/rk817_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Sebastian Reichel May 8, 2023, 12:43 p.m. UTC | #1
Hi,

On Sat, Apr 15, 2023 at 06:49:55PM +0200, Christophe JAILLET wrote:
> dev_err_probe() already display the error code. There is no need to
> duplicate it explicitly in the error message.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/rk817_charger.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/rk817_charger.c b/drivers/power/supply/rk817_charger.c
> index 1a2143641e66..8328bcea1a29 100644
> --- a/drivers/power/supply/rk817_charger.c
> +++ b/drivers/power/supply/rk817_charger.c
> @@ -1134,7 +1134,7 @@ static int rk817_charger_probe(struct platform_device *pdev)
>  					    &bat_info);
>  	if (ret) {
>  		return dev_err_probe(dev, ret,
> -				     "Unable to get battery info: %d\n", ret);
> +				     "Unable to get battery info\n");
>  	}
>  
>  	if ((bat_info->charge_full_design_uah <= 0) ||
> -- 
> 2.34.1
>
  

Patch

diff --git a/drivers/power/supply/rk817_charger.c b/drivers/power/supply/rk817_charger.c
index 1a2143641e66..8328bcea1a29 100644
--- a/drivers/power/supply/rk817_charger.c
+++ b/drivers/power/supply/rk817_charger.c
@@ -1134,7 +1134,7 @@  static int rk817_charger_probe(struct platform_device *pdev)
 					    &bat_info);
 	if (ret) {
 		return dev_err_probe(dev, ret,
-				     "Unable to get battery info: %d\n", ret);
+				     "Unable to get battery info\n");
 	}
 
 	if ((bat_info->charge_full_design_uah <= 0) ||