Re: [PATCH] PCI: mvebu: Remove unneeded gpiod NULL check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 16, 2017 at 06:16:13PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@xxxxxxx>
> 
> 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@xxxxxxx>

Applied with Thomas' ack to pci/host-mvebu for v4.14, thanks!

> ---
>  drivers/pci/host/pci-mvebu.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
> index f353a6e..fa227d8 100644
> --- a/drivers/pci/host/pci-mvebu.c
> +++ b/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);
>  }
> -- 
> 2.7.4
> 



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux