Commit a80775d6 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

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: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ad9c87e1
...@@ -516,7 +516,7 @@ static int mt7621_pci_probe(struct platform_device *pdev) ...@@ -516,7 +516,7 @@ static int mt7621_pci_probe(struct platform_device *pdev)
bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie)); bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie));
if (!bridge) if (!bridge)
return -ENODEV; return -ENOMEM;
pcie = pci_host_bridge_priv(bridge); pcie = pci_host_bridge_priv(bridge);
pcie->dev = dev; pcie->dev = dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment