Thomas Zimmermann tzimmermann@suse.de writes:
The res pointer passed to simpledrm_device_release_clocks() and simpledrm_device_release_regulators() points to an instance of struct simpledrm_device. No need to upcast from struct drm_device. The upcast is harmless, as DRM device is the first field in struct simpledrm_device.
Signed-off-by: Thomas Zimmermann tzimmermann@suse.de Fixes: 11e8f5fd223b ("drm: Add simpledrm driver") Cc: stable@vger.kernel.org # v5.14+
Reviewed-by: Javier Martinez Canillas javierm@redhat.com