]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00279226 media: ov5642: correct io_regulator sanity check
authorLiu Ying <Ying.Liu@freescale.com>
Wed, 11 Sep 2013 10:25:44 +0000 (18:25 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:31 +0000 (10:06 +0200)
The following commit introduced a wrong sanity check for
the io_regulator which is intended to be got from device tree.
a364635a535705a8c16df49ff9bc7b9362b083ec

This patch corrects the sanity check.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit a0ff4d112dcd8a71547f2b95731f2fedb21a77e4)

drivers/media/platform/mxc/capture/ov5642.c

index e399c19fcece7b095a4d5ebc18a6dab69223d870..04228655712a2ec1d440c2ffaef66142effb32a9 100755 (executable)
@@ -3054,7 +3054,7 @@ static int ov5642_power_on(struct device *dev)
        int ret = 0;
 
        io_regulator = devm_regulator_get(dev, "DOVDD");
-       if (io_regulator) {
+       if (!IS_ERR(io_regulator)) {
                regulator_set_voltage(io_regulator,
                                      OV5642_VOLTAGE_DIGITAL_IO,
                                      OV5642_VOLTAGE_DIGITAL_IO);