drm/atomic: Don't try to free a NULL state
Subsystems (2)
PATCH 1/1 drm/atomic: Don't try to free a NULL state
Consistently with other free functions, handle the NULL case without oopsing.
--- drivers/gpu/drm/drm_atomic.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_atomic.c +3 -0
@@ -179,6 +179,9 @@ EXPORT_SYMBOL(drm_atomic_state_clear);*/ void drm_atomic_state_free (struct drm_atomic_state *state) { +if (!state) +return ; +drm_atomic_state_clear (state);DRM_DEBUG_ATOMIC ("Freeing atomic state %p\n" , state);
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 14 lines · Ander Conselvan de Oliveira
Consistently with other free functions, handle the NULL case without oopsing.
Signed-off-by Ander Conselvan de Oliveira <[email protected]>--- drivers/gpu/drm/drm_atomic.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/drm_atomic.c +0
-0
drivers/gpu/drm/drm_atomic.c EXPORT_SYMBOL(drm_atomic_state_clear); · line 187
Quoted 9 lines
drivers/gpu/drm/drm_atomic.c +3
-0@@ -179,6 +179,9 @@ EXPORT_SYMBOL(drm_atomic_state_clear);*/ void drm_atomic_state_free (struct drm_atomic_state *state) { +if (!state) +return ; +drm_atomic_state_clear (state);DRM_DEBUG_ATOMIC ("Freeing atomic state %p\n" , state);
It'd probably make sense to fix all code that uses drm_atomic_state_free() at the same time.
Regards, David Weinehall
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 23 lines · David Weinehall
Quoted 22 lines · Ander Conselvan de Oliveira
Consistently with other free functions, handle the NULL case without oopsing.
Signed-off-by Ander Conselvan de Oliveira <[email protected]>--- drivers/gpu/drm/drm_atomic.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/drm_atomic.c +3
-0@@ -179,6 +179,9 @@ EXPORT_SYMBOL(drm_atomic_state_clear);*/ void drm_atomic_state_free (struct drm_atomic_state *state) { +if (!state) +return ; +drm_atomic_state_clear (state);
Quoted 4 lines
drivers/gpu/drm/drm_atomic.c EXPORT_SYMBOL(drm_atomic_state_clear); · line 187
Quoted 1 line
drivers/gpu/drm/drm_atomic.c +0
-0DRM_DEBUG_ATOMIC ("Freeing atomic state %p\n" , state);It'd probably make sense to fix all code that uses
drm_atomic_state_free()at the same time.
Imo we can do that as follow-ups as needed. Applied to topic/drm-misc, thanks.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Task id: 6092 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -1 270/270 269/270
ILK 303/303 303/303 SNB 304/304 304/304 IVB 337/337 337/337 BYT 287/287 287/287 HSW 361/361 361/361 BDW 309/309 309/309
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
PNV igt@gem_userptr_blits@coherency-sync CRASH(3)PASS(2) CRASH(2)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx