Skip to content

Commit

Permalink
drm/appletbdrm: Fix ref-counting on dmadev
Browse files Browse the repository at this point in the history
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@suse.de>
Fixes: 0670c2f ("drm/tiny: add driver for Apple Touch Bars in x86 Macs")
Cc: Aditya Garg <gargaditya08@live.com>
Cc: Aun-Ali Zaidi <admin@kodeit.net>
Cc: dri-devel@lists.freedesktop.org
Acked-by: Aditya Garg <gargaditya08@live.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250307083702.142675-1-tzimmermann@suse.de
  • Loading branch information
Thomas Zimmermann committed Mar 10, 2025
1 parent d65a27f commit 914ee6e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/gpu/drm/tiny/appletbdrm.c
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit 914ee6e

Please sign in to comment.