summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-26 19:44:37 +0300
committerTom Rini <trini@konsulko.com>2021-02-25 00:51:48 +0300
commitda7991b38e1f6d9b172a72650286be2558dc447f (patch)
treefe258512fc36583ed946fbff05fb38e8559f8cfe /fs
parentcbe607b920bc0827d8fe379ed4f5ae4e2058513e (diff)
downloadu-boot-da7991b38e1f6d9b172a72650286be2558dc447f.tar.xz
cmd: pwm: Rework argc sanity checking
Currently, we check argc in a number of places to make sure that we have all of the required arguments for each of the pwm sub-commands. However, there's at least one place where we've got dead code as we'll never have argc == 0, due to checking that argc was at least 4 earlier and having only subtracted 3. Rework things so that when we have determined our subcommand make sure we have the right number of arguments for it, or error out. This means we can stop checking against argc again later. Reported-by: Coverity (CID: 316601) Cc: Pragnesh Patel <pragnesh.patel@sifive.com> Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions