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 <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Sergio Paracuellos 2018-11-04 11:49:28 +01:00 committed by Greg Kroah-Hartman
parent ad9c87e129
commit a80775d647

View File

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