Prechádzať zdrojové kódy

PCI: mvebu: 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: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com
Fabio Estevam 8 rokov pred
rodič
commit
c353951653
1 zmenil súbory, kde vykonal 1 pridanie a 2 odobranie
  1. 1 2
      drivers/pci/host/pci-mvebu.c

+ 1 - 2
drivers/pci/host/pci-mvebu.c

@@ -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);
 }