lkml.org 
[lkml]   [2020]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drm/i915/selftests: Fix runtime PM imbalance on error
Date
When drm_dev_init() returns an error code, a pairing
runtime PM usage counter decrement is needed to keep
the counter balanced. For error paths after this call,
things are the same.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index 754d0eb6beaa..fdf01461acc6 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -200,6 +200,7 @@ struct drm_i915_private *mock_gem_device(void)
drm_mode_config_cleanup(&i915->drm);
drm_dev_fini(&i915->drm);
put_device:
+ pm_runtime_put_noidle(&pdev->dev);
put_device(&pdev->dev);
err:
return NULL;
--
2.17.1
\
 
 \ /
  Last update: 2020-05-24 04:10    [W:0.023 / U:11.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site