From: Wei Yongjun Date: Thu, 16 Apr 2015 12:21:02 +0000 (+0800) Subject: rocker: fix error return code in rocker_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3122a92e80957e30ea9afd963128c6e6c0f5c2ac;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git rocker: fix error return code in rocker_probe() Fix to return -EINVAL from the invalid PCI region size error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Acked-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c index a87b177bd723..a570a60533be 100644 --- a/drivers/net/ethernet/rocker/rocker.c +++ b/drivers/net/ethernet/rocker/rocker.c @@ -4759,6 +4759,7 @@ static int rocker_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (pci_resource_len(pdev, 0) < ROCKER_PCI_BAR0_SIZE) { dev_err(&pdev->dev, "invalid PCI region size\n"); + err = -EINVAL; goto err_pci_resource_len_check; }