]> git.dujemihanovic.xyz Git - u-boot.git/commit
cmd: simplify do_adc_single()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 25 Apr 2022 20:26:45 +0000 (22:26 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 5 May 2022 19:06:02 +0000 (15:06 -0400)
commit54d24d72601321f4470c4edf31c6b29adae424a7
treeedc082ec54051b84431fc912979a33ebe87ddaa2
parente4269636bec4e64dc363e237c2d1efa0e8645310
cmd: simplify do_adc_single()

If argc is not < 3, it must be >= 3.

If argc >= 3, argv[2] cannot be NULL.

Fixes: 9de612ae4ded ("cmd: adc: Add support for storing ADC result in env variable")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
cmd/adc.c