diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2014-08-28 11:03:14 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2014-08-29 10:18:19 +0200 |
commit | 70145f87139fbc43b726f873813cd91dce371899 (patch) | |
tree | ad2aea1d515738ba8af8755afbe33e0b88a7060c /drivers/pwm/pwm-atmel.c | |
parent | 7264354c0cb8c04bd4a85d24e5d57a0e2417c2fb (diff) | |
download | linux-70145f87139fbc43b726f873813cd91dce371899.tar.bz2 |
pwm: Fix uninitialized warnings in pwm_get()
With some versions of gcc (e.g. 4.1.2):
drivers/pwm/core.c: In function ‘pwm_get’:
drivers/pwm/core.c:610: warning: ‘polarity’ may be used uninitialized in this function
drivers/pwm/core.c:609: warning: ‘period’ may be used uninitialized in this function
While these are false positives, we can get rid of them by refactoring
the code to store a pointer to the best match, as suggested before by
Thierry Reding. This does require moving the mutex_unlock() down.
Fixes: d717ea73e36dd565 ("pwm: Fix period and polarity in pwm_get() for non-perfect matches")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-atmel.c')
0 files changed, 0 insertions, 0 deletions