diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index 3cc45e56b7c92abe13ce6fdf6af4a128da361674..ef5f229a4b4c2a2699e61eca899b371798850464 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -1273,6 +1273,8 @@ static void imx_ldb_unbind(struct device *dev, struct device *master,
 		kfree(channel->edid);
 		i2c_put_adapter(channel->ddc);
 	}
+
+	dev_set_drvdata(dev, NULL);
 }
 
 static const struct component_ops imx_ldb_ops = {
@@ -1298,6 +1300,9 @@ static int imx_ldb_suspend(struct device *dev)
 	struct imx_ldb_channel *channel;
 	int i;
 
+	if (imx_ldb == NULL)
+		return 0;
+
 	for (i = 0; i < 2; i++) {
 		channel = &imx_ldb->channel[i];
 
@@ -1315,6 +1320,9 @@ static int imx_ldb_resume(struct device *dev)
 	struct imx_ldb *imx_ldb = dev_get_drvdata(dev);
 	int i;
 
+	if (imx_ldb == NULL)
+		return 0;
+
 	if (imx_ldb->visible_phy)
 		for (i = 0; i < 2; i++)
 			phy_init(imx_ldb->channel[i].phy);