]> Pileus Git - ~andy/linux/blobdiff - drivers/power/generic-adc-battery.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[~andy/linux] / drivers / power / generic-adc-battery.c
index 8cb5d7f67acebac1e60cf5006ae857835e8161cb..59a1421f92885ea8fa98f0468b9a8b5660010c65 100644 (file)
@@ -299,8 +299,10 @@ static int gab_probe(struct platform_device *pdev)
        }
 
        /* none of the channels are supported so let's bail out */
-       if (index == ARRAY_SIZE(gab_chan_name))
+       if (index == 0) {
+               ret = -ENODEV;
                goto second_mem_fail;
+       }
 
        /*
         * Total number of properties is equal to static properties