generic-adc-battery: Fix checking if none of the channels are supported
generic-adc-battery: Fix checking if none of the channels are supported

If none of the channels are supported, index is 0. Also ensure to return
error code instead of 0 in goto second_mem_fail path.

Signed-off-by: Axel Lin <b6ffd6973e972cb999e8e535ab74da7fee0c035f@ingics.com>
Acked-by: anish kumar <56bf4a938a1f85c13be9ccd9bd34fdf2faf1a871@gmail.com>
Signed-off-by: Anton Vorontsov <14deb5e5e417133e888bf47bb6a3555c9bb7d81c@enomsg.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs