瀏覽代碼

tifm: fix error return code in tifm_7xx1_probe()

Fix to return ENODEV in the pci ioremap 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>
Wei Yongjun 12 年之前
父節點
當前提交
86d6275a8f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/misc/tifm_7xx1.c

+ 3 - 1
drivers/misc/tifm_7xx1.c

@@ -356,8 +356,10 @@ static int tifm_7xx1_probe(struct pci_dev *dev,
 	pci_set_drvdata(dev, fm);
 	pci_set_drvdata(dev, fm);
 
 
 	fm->addr = pci_ioremap_bar(dev, 0);
 	fm->addr = pci_ioremap_bar(dev, 0);
-	if (!fm->addr)
+	if (!fm->addr) {
+		rc = -ENODEV;
 		goto err_out_free;
 		goto err_out_free;
+	}
 
 
 	rc = request_irq(dev->irq, tifm_7xx1_isr, IRQF_SHARED, DRIVER_NAME, fm);
 	rc = request_irq(dev->irq, tifm_7xx1_isr, IRQF_SHARED, DRIVER_NAME, fm);
 	if (rc)
 	if (rc)