diff options
| author | Joonas Lahtinen <[email protected]> | 2018-10-18 12:20:25 +0300 |
|---|---|---|
| committer | Joonas Lahtinen <[email protected]> | 2018-10-18 18:19:33 +0300 |
| commit | 198a2a2f1aea3eb6ea033cfec26da9a637405289 (patch) | |
| tree | 8a8c8348666e6dee112c9ee2209690ff0c3ab6dd | |
| parent | e346a991f42ca2a397166ac73445832966aa8968 (diff) | |
drm/i915: Drop rpm wakeref on error in debugfs/i915_drop_caches_set
Use single exit point to drop rpm wakeref in case of an error.
Fixes: 9d3eb2c33f03 ("drm/i915: Hold rpm wakeref for debugfs/i915_drop_caches_set")
Signed-off-by: Joonas Lahtinen <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
| -rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 2e01159f365d..5b37d5f8e132 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -4197,7 +4197,7 @@ i915_drop_caches_set(void *data, u64 val) if (val & (DROP_ACTIVE | DROP_RETIRE | DROP_RESET_SEQNO)) { ret = mutex_lock_interruptible(&i915->drm.struct_mutex); if (ret) - return ret; + goto out; if (val & DROP_ACTIVE) ret = i915_gem_wait_for_idle(i915, @@ -4244,6 +4244,7 @@ i915_drop_caches_set(void *data, u64 val) if (val & DROP_FREED) i915_gem_drain_freed_objects(i915); +out: intel_runtime_pm_put(i915); return ret; |