[PATCH] drm/appletbdrm: Fix ref-counting on dmadev

Thomas Zimmermann tzimmermann at suse.de
Fri Mar 7 08:36:53 UTC 2025


Remove the put_device() call on dmadev. The driver sets the field
without getting a reference, so it shouldn't put a reference either.
The dmadev field points to the regular USB device for which DRM
maintains a reference internally. Hence dmadev will not become dangling
during the DRM device's lifetime.

Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Fixes: 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs")
Cc: Aditya Garg <gargaditya08 at live.com>
Cc: Aun-Ali Zaidi <admin at kodeit.net>
Cc: dri-devel at lists.freedesktop.org
---
 drivers/gpu/drm/tiny/appletbdrm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/tiny/appletbdrm.c b/drivers/gpu/drm/tiny/appletbdrm.c
index 394c8f9bd41a..4370ba22dd88 100644
--- a/drivers/gpu/drm/tiny/appletbdrm.c
+++ b/drivers/gpu/drm/tiny/appletbdrm.c
@@ -805,7 +805,6 @@ static void appletbdrm_disconnect(struct usb_interface *intf)
 	struct appletbdrm_device *adev = usb_get_intfdata(intf);
 	struct drm_device *drm = &adev->drm;
 
-	put_device(adev->dmadev);
 	drm_dev_unplug(drm);
 	drm_atomic_helper_shutdown(drm);
 }
-- 
2.48.1



More information about the dri-devel mailing list