summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2017-07-20 05:41:20 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-07-26 15:41:57 +0300
commitd9ba7bd98a1a95675cc97ef87e911376d4bff6a8 (patch)
tree6a020ed358bcad815e5b842263a5221a92f53ad8 /drivers/media/i2c
parentc8dbe3181b80dbb1f3e6c9f27da9bb3c1459c656 (diff)
downloadlinux-d9ba7bd98a1a95675cc97ef87e911376d4bff6a8.tar.xz
media: ov5640: Remove unneeded gpiod NULL check
The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ov5640.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 1f5b483cf334..39a2269c0bee 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -1524,8 +1524,7 @@ static int ov5640_restore_mode(struct ov5640_dev *sensor)
static void ov5640_power(struct ov5640_dev *sensor, bool enable)
{
- if (sensor->pwdn_gpio)
- gpiod_set_value(sensor->pwdn_gpio, enable ? 0 : 1);
+ gpiod_set_value(sensor->pwdn_gpio, enable ? 0 : 1);
}
static void ov5640_reset(struct ov5640_dev *sensor)