mirror of
https://github.com/torvalds/linux.git
synced 2024-12-06 02:52:22 +00:00
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:
parent
ad9c87e129
commit
a80775d647
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user