]> git.baikalelectronics.ru Git - uboot.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)
commitaaa097bbfe24daa8987272961f5c2577eab83926
treeedc082ec54051b84431fc912979a33ebe87ddaa2
parent4e34886cdc0c8eecb1ab11e650c673de9808d948
cmd: simplify do_adc_single()

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

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

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