summaryrefslogtreecommitdiffstats
path: root/drivers/video/mtl017.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/mtl017.c')
-rw-r--r--drivers/video/mtl017.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/mtl017.c b/drivers/video/mtl017.c
index 085ea110ba..423fb8e4fd 100644
--- a/drivers/video/mtl017.c
+++ b/drivers/video/mtl017.c
@@ -244,6 +244,9 @@ static int mtl017_probe(struct device_d *dev)
mtl017->client = to_i2c_client(dev);
mtl017->regulator = regulator_get(dev, "vdd");
+ if (IS_ERR(mtl017->regulator))
+ mtl017->regulator = NULL;
+
mtl017->enable_gpio = of_get_named_gpio_flags(dev->device_node,
"enable-gpios", 0, &flags);
if (gpio_is_valid(mtl017->enable_gpio)) {