]> git.itanic.dy.fi Git - linux-stable/commit
drm/xe: Fix bo leak in intel_fb_bo_framebuffer_init
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 4 Apr 2024 09:03:02 +0000 (11:03 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fri, 12 Apr 2024 10:42:21 +0000 (12:42 +0200)
commita2f3d731be3893e730417ae3190760fcaffdf549
treeefc612cfe4f1c879ff9f2d6e2aa0a93e34e64cad
parent4209d635a823619038db0bf72e86a223f4186634
drm/xe: Fix bo leak in intel_fb_bo_framebuffer_init

Add a unreference bo in the error path, to prevent leaking a bo ref.

Return 0 on success to clarify the success path.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: 44e694958b95 ("drm/xe/display: Implement display support")
Cc: <stable@vger.kernel.org> # v6.8+
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404090302.68422-1-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/xe/display/intel_fb_bo.c