ASoC: wm8804: Remove unneeded gpiod NULL check
authorFabio Estevam <fabio.estevam@nxp.com>
Sun, 16 Jul 2017 21:11:07 +0000 (18:11 -0300)
committerMark Brown <broonie@kernel.org>
Mon, 17 Jul 2017 14:42:14 +0000 (15:42 +0100)
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: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8804.c

index af95d648265b3e92e345101542b332aee35191d4..fc69b87443d80489382b97332de6d5ad12a58ec8 100644 (file)
@@ -623,8 +623,7 @@ int wm8804_probe(struct device *dev, struct regmap *regmap)
                return ret;
        }
 
                return ret;
        }
 
-       if (wm8804->reset)
-               gpiod_set_value_cansleep(wm8804->reset, 1);
+       gpiod_set_value_cansleep(wm8804->reset, 1);
 
        ret = regmap_read(regmap, WM8804_RST_DEVID1, &id1);
        if (ret < 0) {
 
        ret = regmap_read(regmap, WM8804_RST_DEVID1, &id1);
        if (ret < 0) {