Skip to content

Commit

Permalink
mcb: Do not return zero on error path in mcb_pci_probe()
Browse files Browse the repository at this point in the history
There is an error path in mcb_pci_probe() where
it returns zero instead of error code.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <[email protected]>
Signed-off-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
khoroshilov authored and gregkh committed Oct 29, 2015
1 parent 213dd19 commit bf25c19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mcb/mcb-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
priv->mapbase = pci_resource_start(pdev, 0);
if (!priv->mapbase) {
dev_err(&pdev->dev, "No PCI resource\n");
ret = -ENODEV;
goto out_disable;
}

Expand Down

0 comments on commit bf25c19

Please sign in to comment.