summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2015-04-16 20:21:02 +0800
committerDavid S. Miller <davem@davemloft.net>2015-04-16 12:13:39 -0400
commit3122a92e80957e30ea9afd963128c6e6c0f5c2ac (patch)
treea21818b6061e0575d95db190814db321a385e2ea
parent538cc282a3efb62cdb62ff9e6e44918c11a3c886 (diff)
downloadlinux-3122a92e80957e30ea9afd963128c6e6c0f5c2ac.tar.bz2
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 <yongjun_wei@trendmicro.com.cn> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/rocker/rocker.c1
1 files changed, 1 insertions, 0 deletions
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;
}