diff options
-rw-r--r-- | drivers/regulator/core.c | 3 | ||||
-rw-r--r-- | drivers/video/mxc/ldb.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 5baa1965aa1..ba40497b522 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1183,6 +1183,9 @@ static struct regulator_dev *regulator_dev_lookup(struct device *dev, struct regulator_dev *r; struct device_node *node; + if (supply == NULL) + return NULL; + /* first do a dt based lookup */ if (dev && dev->of_node) { node = of_get_regulator(dev, supply); diff --git a/drivers/video/mxc/ldb.c b/drivers/video/mxc/ldb.c index 29c90a1fdd0..e5a80cb4834 100644 --- a/drivers/video/mxc/ldb.c +++ b/drivers/video/mxc/ldb.c @@ -540,6 +540,7 @@ static int ldb_disp_init(struct mxc_dispdrv_handle *disp, } if (!plat_data) { + memset(&of_data, 0, sizeof(of_data)); plat_data = &of_data; if (of_get_ldb_data(ldb, plat_data) < 0) { dev_err(&ldb->pdev->dev, "no platform data\n"); |