drm/gem-atomic: Reset plane state to NULL if allocation failed
Subsystems (2)
Thomas Zimmermann
maintainerPATCH 1/1 drm/gem-atomic: Reset plane state to NULL if allocation failed
Unconditionally reset plane->state to NULL if the allocation of the shadow plane state fails. Avoids an invalid address in the field.
Signed-off-by Thomas Zimmermann <[email protected]>
--- drivers/gpu/drm/drm_gem_atomic_helper.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/drm_gem_atomic_helper.c +0 -2
@@ -338,8 +338,6 @@ void drm_gem_reset_shadow_plane(struct drm_plane *plane) } shadow_plane_state =kzalloc (sizeof (*shadow_plane_state),GFP_KERNEL ); -if (!shadow_plane_state) -return ;__drm_gem_reset_shadow_plane (plane, shadow_plane_state); }EXPORT_SYMBOL (drm_gem_reset_shadow_plane);
Signature · 1 line
2.51.0
Quoted 5 lines · Thomas Zimmermann
Unconditionally reset
plane->stateto NULL if the allocation of the shadow plane state fails. Avoids an invalid address in the field.Signed-off-by Thomas Zimmermann <[email protected]>---
Reviewed-by Javier Martinez Canillas <[email protected]>
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat