diff options
| author | Arnd Bergmann <[email protected]> | 2016-10-18 15:16:23 +0000 |
|---|---|---|
| committer | Daniel Vetter <[email protected]> | 2016-10-19 07:23:33 +0000 |
| commit | b9a1b7179cde240abf67a613f2a67be7c56cc59f (patch) | |
| tree | 432268c50deb5538e1534e42bc9eaa4b2253ba7e /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | drm: Don't export the drm_fb_get_bpp_depth() function (diff) | |
| download | kernel-b9a1b7179cde240abf67a613f2a67be7c56cc59f.tar.gz kernel-b9a1b7179cde240abf67a613f2a67be7c56cc59f.zip | |
i915: don't call drm_atomic_state_put on invalid pointer
The introduction of reference counting on the state structures caused
sanitize_watermarks() in i915 to break in the error handling case,
as pointed out by gcc -Wmaybe-uninitialized
drivers/gpu/drm/i915/intel_display.c: In function ‘intel_modeset_init’:
include/drm/drm_atomic.h:224:2: error: ‘state’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
This changes the function back to only drop the reference count
when it was successfully allocated first.
Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state")
Cc: Chris Wilson <[email protected]>
Cc: Daniel Vetter <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions
