From: Sergio Paracuellos Date: Thu, 19 Mar 2020 16:14:16 +0000 (+0100) Subject: staging: mt7621-pci: don't return if get gpio fails X-Git-Tag: v5.7-rc1~190^2~82 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e37c13d958050abe9e4389355be57c6fb4119b5;p=thirdparty%2Fkernel%2Flinux.git staging: mt7621-pci: don't return if get gpio fails In some platforms gpio's are not used for reset but for other purposes. Because of that when we try to get them are valid gpio's but are already assigned to do other function. To avoid those kind of problems in those platforms just notice the fail in the kernel but continue doing normal boot. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20200319161416.19033-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 2a01645162a51..d6fc8a08c9bdd 100644 --- a/drivers/staging/mt7621-pci/pci-mt7621.c +++ b/drivers/staging/mt7621-pci/pci-mt7621.c @@ -363,10 +363,8 @@ static int mt7621_pcie_parse_port(struct mt7621_pcie *pcie, port->gpio_rst = devm_gpiod_get_index_optional(dev, "reset", slot, GPIOD_OUT_LOW); - if (IS_ERR(port->gpio_rst)) { - dev_err(dev, "Failed to get GPIO for PCIe%d\n", slot); - return PTR_ERR(port->gpio_rst); - } + if (IS_ERR(port->gpio_rst)) + dev_notice(dev, "Failed to get GPIO for PCIe%d\n", slot); port->slot = slot; port->pcie = pcie;