diff mbox series

PM / devfreq: exynos-ppmu: remove useless assignment

Message ID 20191001124641.22896-1-m.szyprowski@samsung.com
State New
Headers show
Series PM / devfreq: exynos-ppmu: remove useless assignment | expand

Commit Message

Marek Szyprowski Oct. 1, 2019, 12:46 p.m. UTC
The error code is propagated to the caller, so there is no need to keep
it additionally in the unused variable.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

---
 drivers/devfreq/event/exynos-ppmu.c | 1 -
 1 file changed, 1 deletion(-)

-- 
2.17.1

Comments

Chanwoo Choi Oct. 1, 2019, 9:33 p.m. UTC | #1
Hi,

On 19. 10. 1. 오후 9:46, Marek Szyprowski wrote:
> The error code is propagated to the caller, so there is no need to keep

> it additionally in the unused variable.

> 

> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---

>  drivers/devfreq/event/exynos-ppmu.c | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c

> index 87b42055e6bc..85c7a77bf3f0 100644

> --- a/drivers/devfreq/event/exynos-ppmu.c

> +++ b/drivers/devfreq/event/exynos-ppmu.c

> @@ -673,7 +673,6 @@ static int exynos_ppmu_probe(struct platform_device *pdev)

>  	for (i = 0; i < info->num_events; i++) {

>  		edev[i] = devm_devfreq_event_add_edev(&pdev->dev, &desc[i]);

>  		if (IS_ERR(edev[i])) {

> -			ret = PTR_ERR(edev[i]);

>  			dev_err(&pdev->dev,

>  				"failed to add devfreq-event device\n");

>  			return PTR_ERR(edev[i]);

> 


Thanks.
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics
diff mbox series

Patch

diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index 87b42055e6bc..85c7a77bf3f0 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -673,7 +673,6 @@  static int exynos_ppmu_probe(struct platform_device *pdev)
 	for (i = 0; i < info->num_events; i++) {
 		edev[i] = devm_devfreq_event_add_edev(&pdev->dev, &desc[i]);
 		if (IS_ERR(edev[i])) {
-			ret = PTR_ERR(edev[i]);
 			dev_err(&pdev->dev,
 				"failed to add devfreq-event device\n");
 			return PTR_ERR(edev[i]);