staging: xillybus: fix error return code in xilly_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 16 Dec 2013 05:51:16 +0000 (13:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2013 17:48:58 +0000 (09:48 -0800)
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>
drivers/staging/xillybus/xillybus_pcie.c

index 0564f97bdde41df513d8e350bfd59ef8bdf5770b..51426d80ca7b85f13dc50f2df182a7c89ce9d7d4 100644 (file)
@@ -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;
        }