diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 2c5dd47c489e..b7890bcb3547 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -3900,6 +3900,11 @@ void dw_hdmi_suspend(struct device *dev) { struct dw_hdmi *hdmi = dev_get_drvdata(dev); + if (!hdmi) { + dev_warn(dev, "Hdmi has not been initialized\n"); + return; + } + mutex_lock(&hdmi->mutex); /* @@ -3927,6 +3932,11 @@ void dw_hdmi_resume(struct device *dev) { struct dw_hdmi *hdmi = dev_get_drvdata(dev); + if (!hdmi) { + dev_warn(dev, "Hdmi has not been initialized\n"); + return; + } + pinctrl_pm_select_default_state(dev); mutex_lock(&hdmi->mutex); dw_hdmi_reg_initial(hdmi);