OSDN Git Service

PCI: mvebu: Remove unneeded gpiod NULL check
authorFabio Estevam <fabio.estevam@nxp.com>
Sun, 16 Jul 2017 21:16:13 +0000 (18:16 -0300)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 2 Aug 2017 21:40:46 +0000 (16:40 -0500)
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: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com
drivers/pci/host/pci-mvebu.c

index f353a6e..fa227d8 100644 (file)
@@ -1186,8 +1186,7 @@ static int mvebu_pcie_powerup(struct mvebu_pcie_port *port)
  */
 static void mvebu_pcie_powerdown(struct mvebu_pcie_port *port)
 {
-       if (port->reset_gpio)
-               gpiod_set_value_cansleep(port->reset_gpio, 1);
+       gpiod_set_value_cansleep(port->reset_gpio, 1);
 
        clk_disable_unprepare(port->clk);
 }