mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-16 20:05:13 -05:00
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 <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20251017091919.58770-1-tzimmermann@suse.de
This commit is contained in:
@@ -334,8 +334,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);
|
||||
|
||||
Reference in New Issue
Block a user