In function twl_probe() at drivers/scsi/3w-sas.c:line 1564, if twl_initialize_device_extension() at line 1601 ,pci_iomap() at line 1614 and twl_reset_sequence() at line 1624 fails, function twl_probe() will return the value of variable retval, which is 0 indicating success because pci_enable_device() at line 1571 and pci_request_regions() at line 1607 succeeded previously.But, function twl_probe() should propagate the error and return the error to its caller functions. The related code snippets in twl_probe are as following. twl_probe @@ drivers/scsi/3w-sas.c:line 1564 1564 static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) 1565 { ... 1571 retval = pci_enable_device(pdev); 1572 if (retval) { 1573 TW_PRINTK(host, TW_DRIVER, 0x17, "Failed to enable pci device"); 1574 goto out_disable_device; 1575 } ... 1601 if (twl_initialize_device_extension(tw_dev)) { 1602 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Failed to initialize device extension"); 1603 goto out_free_device_extension; 1604 } ... 1606 /* Request IO regions */ 1607 retval = pci_request_regions(pdev, "3w-sas"); 1608 if (retval) { 1609 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1b, "Failed to get mem region"); 1610 goto out_free_device_extension; 1611 } 1612 1613 /* Save base address, use region 1 */ 1614 tw_dev->base_addr = pci_iomap(pdev, 1, 0); 1615 if (!tw_dev->base_addr) { 1616 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1c, "Failed to ioremap"); 1617 goto out_release_mem_region; 1618 } 1619 1620 /* Disable interrupts on the card */ 1621 TWL_MASK_INTERRUPTS(tw_dev); 1622 1623 /* Initialize the card */ 1624 if (twl_reset_sequence(tw_dev, 0)) { 1625 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1d, "Controller reset failed during probe"); 1626 goto out_iounmap; 1627 } ... 1694 return 0; ... 1700 out_iounmap: 1701 iounmap(tw_dev->base_addr); 1702 out_release_mem_region: 1703 pci_release_regions(pdev); 1704 out_free_device_extension: 1705 twl_free_device_extension(tw_dev); 1706 scsi_host_put(host); 1707 out_disable_device: 1708 pci_disable_device(pdev); 1709 1710 return retval; 1711 } /* End twl_probe() */