mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02: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:
parent
5a5e9c0228
commit
9837f9fcb7
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user