Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / drivers / pcmcia / pd6729.c
index 8bed1dab903983e4f5d8a11f238b59567931cec0..70a33468bcd0b6851f2320578963b74a4df9ea96 100644 (file)
@@ -641,6 +641,12 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev,
        if ((ret = pci_enable_device(dev)))
                goto err_out_free_mem;
 
+       if (!pci_resource_start(dev, 0)) {
+               printk(KERN_INFO "pd6729: refusing to load the driver "
+                                "as the io_base is 0.\n");
+               goto err_out_free_mem;
+       }
+
        printk(KERN_INFO "pd6729: Cirrus PD6729 PCI to PCMCIA Bridge "
                "at 0x%llx on irq %d\n",
                (unsigned long long)pci_resource_start(dev, 0), dev->irq);
@@ -758,7 +764,7 @@ static void __devexit pd6729_pci_remove(struct pci_dev *dev)
 #ifdef CONFIG_PM
 static int pd6729_socket_suspend(struct pci_dev *dev, pm_message_t state)
 {
-       return pcmcia_socket_dev_suspend(&dev->dev, state);
+       return pcmcia_socket_dev_suspend(&dev->dev);
 }
 
 static int pd6729_socket_resume(struct pci_dev *dev)