[media] v4l: mt9v032: Remove unneeded gpiod NULL check
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 26 Jan 2016 18:11:51 +0000 (16:11 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Jan 2017 13:54:15 +0000 (11:54 -0200)
The gpiod API checks for NULL descriptors, there's no need to duplicate
the check in the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/mt9v032.c

index 58eb62f1ba214449d72a8f06b09e2f21c1eb47c4..107eb3baa11f4299e12840c74e0d2df5c6d290c9 100644 (file)
@@ -266,8 +266,7 @@ static int mt9v032_power_on(struct mt9v032 *mt9v032)
        struct regmap *map = mt9v032->regmap;
        int ret;
 
-       if (mt9v032->reset_gpio)
-               gpiod_set_value_cansleep(mt9v032->reset_gpio, 1);
+       gpiod_set_value_cansleep(mt9v032->reset_gpio, 1);
 
        ret = clk_set_rate(mt9v032->clk, mt9v032->sysclk);
        if (ret < 0)