]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: ep93xx: Fix read of uninitialized variable ret
authorColin Ian King <colin.king@canonical.com>
Tue, 29 Jun 2021 17:22:53 +0000 (18:22 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 30 Jun 2021 17:12:21 +0000 (19:12 +0200)
commit5eaaab2c4be1dc54769d4ae30ad2d6e932603e77
tree8761478f13555305b4fad7eb510a320f940e528c
parent6dc303bf0a79fc71cd8eac2e54fa72f37c5b51d4
pwm: ep93xx: Fix read of uninitialized variable ret

There is a potential path in function ep93xx_pwm_apply where ret is
never assigned a value and it is checked for an error code. Fix this
by ensuring ret is zero'd in the success path to avoid this issue.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: f6ef94edf0f6 ("pwm: ep93xx: Unfold legacy callbacks into ep93xx_pwm_apply()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-ep93xx.c