vme: vme_tsi148.c: fix error return code in tsi148_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 19 Jun 2013 02:42:35 +0000 (10:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2013 23:23:25 +0000 (16:23 -0700)
Fix to return a negative error code in the tsi148_crcsr_init() error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vme/bridges/vme_tsi148.c

index 0bb512c..94c892f 100644 (file)
@@ -2582,7 +2582,8 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        dev_info(&pdev->dev, "VME Write and flush and error check is %s\n",
                err_chk ? "enabled" : "disabled");
 
-       if (tsi148_crcsr_init(tsi148_bridge, pdev)) {
+       retval = tsi148_crcsr_init(tsi148_bridge, pdev);
+       if (retval) {
                dev_err(&pdev->dev, "CR/CSR configuration failed.\n");
                goto err_crcsr;
        }