[PATCH] power: supply: ab8500: remove unneeded variable

cgel.zte@gmail.com posted 1 patch 4 years, 5 months ago
drivers/power/supply/ab8500_fg.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH] power: supply: ab8500: remove unneeded variable
Posted by cgel.zte@gmail.com 4 years, 5 months ago
From: Changcheng Deng <deng.changcheng@zte.com.cn>

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
 drivers/power/supply/ab8500_fg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index b0919a6a6587..3927f4ad7c38 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -3170,7 +3170,6 @@ static int ab8500_fg_probe(struct platform_device *pdev)
 
 static int ab8500_fg_remove(struct platform_device *pdev)
 {
-	int ret = 0;
 	struct ab8500_fg *di = platform_get_drvdata(pdev);
 
 	component_del(&pdev->dev, &ab8500_fg_component_ops);
@@ -3178,7 +3177,7 @@ static int ab8500_fg_remove(struct platform_device *pdev)
 	ab8500_fg_sysfs_exit(di);
 	ab8500_fg_sysfs_psy_remove_attrs(di);
 
-	return ret;
+	return 0;
 }
 
 static SIMPLE_DEV_PM_OPS(ab8500_fg_pm_ops, ab8500_fg_suspend, ab8500_fg_resume);
-- 
2.25.1

Re: [PATCH] power: supply: ab8500: remove unneeded variable
Posted by Sebastian Reichel 4 years, 4 months ago
Hi,

On Fri, Jan 07, 2022 at 02:26:02AM +0000, cgel.zte@gmail.com wrote:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
> 
> Remove unneeded variable used to store return value.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/ab8500_fg.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
> index b0919a6a6587..3927f4ad7c38 100644
> --- a/drivers/power/supply/ab8500_fg.c
> +++ b/drivers/power/supply/ab8500_fg.c
> @@ -3170,7 +3170,6 @@ static int ab8500_fg_probe(struct platform_device *pdev)
>  
>  static int ab8500_fg_remove(struct platform_device *pdev)
>  {
> -	int ret = 0;
>  	struct ab8500_fg *di = platform_get_drvdata(pdev);
>  
>  	component_del(&pdev->dev, &ab8500_fg_component_ops);
> @@ -3178,7 +3177,7 @@ static int ab8500_fg_remove(struct platform_device *pdev)
>  	ab8500_fg_sysfs_exit(di);
>  	ab8500_fg_sysfs_psy_remove_attrs(di);
>  
> -	return ret;
> +	return 0;
>  }
>  
>  static SIMPLE_DEV_PM_OPS(ab8500_fg_pm_ops, ab8500_fg_suspend, ab8500_fg_resume);
> -- 
> 2.25.1
>