Browse Source

staging: xillybus: fix error return code in xilly_probe()

Fix to return negative error code -EIO from the error handling
case instead of 0.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun 11 years ago
parent
commit
8eec455551
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/xillybus/xillybus_pcie.c

+ 1 - 1
drivers/staging/xillybus/xillybus_pcie.c

@@ -168,9 +168,9 @@ static int xilly_probe(struct pci_dev *pdev,
 	}
 
 	endpoint->registers = pci_iomap(pdev, 0, 128);
-
 	if (!endpoint->registers) {
 		dev_err(endpoint->dev, "Failed to map BAR 0. Aborting.\n");
+		rc = -EIO;
 		goto failed_iomap0;
 	}