Merge tag 'hardening-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
[platform/kernel/linux-starfive.git] / drivers / gpu / drm / sti / sti_hdmi.c
index 09e0cad..8539fe1 100644 (file)
@@ -941,7 +941,7 @@ static void sti_hdmi_set_mode(struct drm_bridge *bridge,
        DRM_DEBUG_DRIVER("\n");
 
        /* Copy the drm display mode in the connector local structure */
-       memcpy(&hdmi->mode, mode, sizeof(struct drm_display_mode));
+       drm_mode_copy(&hdmi->mode, mode);
 
        /* Update clock framerate according to the selected mode */
        ret = clk_set_rate(hdmi->clk_pix, mode->clock * 1000);