diff mbox series

[18/31] drm/lima: remove unneeded devm_devfreq_remove_device()

Message ID 20210101165507.19486-19-tiny.windzz@gmail.com
State New
Headers show
Series Introduce devm_pm_opp_* API | expand

Commit Message

Yangtao Li Jan. 1, 2021, 4:54 p.m. UTC
There is no need to manually release devm related resources.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/gpu/drm/lima/lima_devfreq.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Viresh Kumar Jan. 4, 2021, 7:32 a.m. UTC | #1
On 01-01-21, 16:54, Yangtao Li wrote:
> There is no need to manually release devm related resources.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
>  drivers/gpu/drm/lima/lima_devfreq.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c
> index d5937cf86504..7690c5c69f9f 100644
> --- a/drivers/gpu/drm/lima/lima_devfreq.c
> +++ b/drivers/gpu/drm/lima/lima_devfreq.c
> @@ -94,11 +94,6 @@ void lima_devfreq_fini(struct lima_device *ldev)
>  		devfreq_cooling_unregister(devfreq->cooling);
>  		devfreq->cooling = NULL;
>  	}
> -
> -	if (devfreq->devfreq) {
> -		devm_devfreq_remove_device(ldev->dev, devfreq->devfreq);
> -		devfreq->devfreq = NULL;
> -	}
>  }

Why is this part of this patchset ?
diff mbox series

Patch

diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c
index d5937cf86504..7690c5c69f9f 100644
--- a/drivers/gpu/drm/lima/lima_devfreq.c
+++ b/drivers/gpu/drm/lima/lima_devfreq.c
@@ -94,11 +94,6 @@  void lima_devfreq_fini(struct lima_device *ldev)
 		devfreq_cooling_unregister(devfreq->cooling);
 		devfreq->cooling = NULL;
 	}
-
-	if (devfreq->devfreq) {
-		devm_devfreq_remove_device(ldev->dev, devfreq->devfreq);
-		devfreq->devfreq = NULL;
-	}
 }
 
 int lima_devfreq_init(struct lima_device *ldev)