firmware/dmi_scan: constify strings
[pandora-kernel.git] / drivers / dca / dca-core.c
index 25ec0bb..819dfda 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/device.h>
 #include <linux/dca.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 #define DCA_VERSION "1.12.1"
 
@@ -419,6 +420,11 @@ void unregister_dca_provider(struct dca_provider *dca, struct device *dev)
 
        raw_spin_lock_irqsave(&dca_lock, flags);
 
+       if (list_empty(&dca_domains)) {
+               raw_spin_unlock_irqrestore(&dca_lock, flags);
+               return;
+       }
+
        list_del(&dca->node);
 
        pci_rc = dca_pci_rc_from_dev(dev);