diff options
author | Aditya Pakki <pakki001@umn.edu> | 2020-06-13 21:21:22 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-07-01 01:59:22 -0400 |
commit | 9fb10671011143d15b6b40d6d5fa9c52c57e9d63 (patch) | |
tree | 9d95ded0889b96230f33f8e9ff14c004333c4f2d /drivers/gpu/drm/radeon/radeon_display.c | |
parent | f79f94765f8c39db0b7dec1d335ab046aac03f20 (diff) | |
download | lwn-9fb10671011143d15b6b40d6d5fa9c52c57e9d63.tar.gz lwn-9fb10671011143d15b6b40d6d5fa9c52c57e9d63.zip |
drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync
On calling pm_runtime_get_sync() the reference count of the device
is incremented. In case of failure, decrement the
reference count before returning the error.
Acked-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_display.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_display.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 35db79a168bf..df1a7eb73651 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -635,8 +635,10 @@ radeon_crtc_set_config(struct drm_mode_set *set, dev = set->crtc->dev; ret = pm_runtime_get_sync(dev->dev); - if (ret < 0) + if (ret < 0) { + pm_runtime_put_autosuspend(dev->dev); return ret; + } ret = drm_crtc_helper_set_config(set, ctx); |