mfd: Fix egpio kzalloc return test
[pandora-kernel.git] / drivers / mfd / htc-egpio.c
index 1a4d046..194df7b 100644 (file)
@@ -307,7 +307,7 @@ static int __init egpio_probe(struct platform_device *pdev)
 
        ei->nchips = pdata->num_chips;
        ei->chip = kzalloc(sizeof(struct egpio_chip) * ei->nchips, GFP_KERNEL);
-       if (!ei) {
+       if (!ei->chip) {
                ret = -ENOMEM;
                goto fail;
        }