ACPI: sbshc: remove raw pointer from printk() message
[pandora-kernel.git] / drivers / regulator / aat2870-regulator.c
index 5abeb3a..298c6c6 100644 (file)
@@ -160,7 +160,7 @@ static struct aat2870_regulator *aat2870_get_regulator(int id)
                        break;
        }
 
-       if (!ri)
+       if (i == ARRAY_SIZE(aat2870_regulators))
                return NULL;
 
        ri->enable_addr = AAT2870_LDO_EN;