From: Sergio Paracuellos Date: Sun, 4 Nov 2018 10:49:28 +0000 (+0100) Subject: staging: mt7621-pci: replace return value if devm_pci_alloc_host_bridge call fails X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a80775d647d3f9b3e25081ca49cc2311a78b7419;p=openwrt%2Fstaging%2Fblogic.git staging: mt7621-pci: replace return value if devm_pci_alloc_host_bridge call fails Driver probe function calls 'devm_pci_alloc_host_bridge'. If this call fails it is returning -ENODEV. Return -ENOMEM instead which is more accurate for this. Signed-off-by: Sergio Paracuellos 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 b7cb2733a9ea..357bbddb02ad 100644 --- a/drivers/staging/mt7621-pci/pci-mt7621.c +++ b/drivers/staging/mt7621-pci/pci-mt7621.c @@ -516,7 +516,7 @@ static int mt7621_pci_probe(struct platform_device *pdev) bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie)); if (!bridge) - return -ENODEV; + return -ENOMEM; pcie = pci_host_bridge_priv(bridge); pcie->dev = dev;