]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mfd: Fix egpio kzalloc return test
authorJulia Lawall <julia@diku.dk>
Wed, 4 Feb 2009 19:44:01 +0000 (20:44 +0100)
committerSamuel Ortiz <samuel@sortiz.org>
Tue, 17 Feb 2009 08:00:10 +0000 (09:00 +0100)
Since ei is already known to be non-NULL, I assume that what was intended
was to test the result of kzalloc.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
drivers/mfd/htc-egpio.c

index 1a4d04664d6dca96426c965b0ad80062f3042a95..194df7b8256c78471ddf7580754ebc9d28e8750b 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;
        }