]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: img: Turn final 'else if' into 'else' in img_pwm_config
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 7 Mar 2019 22:36:28 +0000 (15:36 -0700)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 20 Mar 2019 11:29:22 +0000 (12:29 +0100)
commitf941c5993f2cc499febd50d846d3744511e05572
tree8402b00fd5481f9973bcd60b3ecc95d3a0385faa
parent69379384e8a9f32c3f9148288c879bfd92a32aec
pwm: img: Turn final 'else if' into 'else' in img_pwm_config

When building with -Wsometimes-uninitialized, Clang warns:

drivers/pwm/pwm-img.c:126:13: error: variable 'timebase' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]

The final else if functions as an else; make that explicit so that Clang
understands that timebase cannot be used uninitialized.

Link: https://github.com/ClangBuiltLinux/linux/issues/400
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-img.c