diff options
author | Eric Miao <eric.miao@linaro.org> | 2012-01-12 13:39:12 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@linaro.org> | 2012-01-12 13:39:12 +0800 |
commit | b2c2a8105a63ac5201f108646e9767a8b3843f24 (patch) | |
tree | ce713eaecc518ba3f2d7649954cfbb0efbaabf6b | |
parent | 273029ebc55fe5959e0bc127e19c5f6989935a50 (diff) |
LINARO: fix oops caused by ldb regulator name being NULL
Signed-off-by: Eric Miao <eric.miao@linaro.org>
-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"); |