aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-stm32.c
diff options
context:
space:
mode:
authorFabrice Gasnier <[email protected]>2018-05-18 15:24:04 +0000
committerLee Jones <[email protected]>2018-06-04 06:13:40 +0000
commita3b51be3cdac4844b2d8bb7c4dad95e191a05697 (patch)
treef13b89f536974f40be634b40c8227d217981f86c /drivers/pwm/pwm-stm32.c
parentmfd: arizona: Update DT doc to support more standard Reset binding (diff)
downloadkernel-a3b51be3cdac4844b2d8bb7c4dad95e191a05697.tar.gz
kernel-a3b51be3cdac4844b2d8bb7c4dad95e191a05697.zip
pwm: stm32: Initialize raw local variables
This removes build warning when COMPILE_TEST=y and MFD_STM32_TIMERS=n in drivers/pwm/pwm-stm32.c. In function 'stm32_pwm_capture' 'raw_prd' and 'raw_dty' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Fabrice Gasnier <[email protected]> Acked-by: Thierry Reding <[email protected]> Tested-by: Randy Dunlap <[email protected]> Signed-off-by: Lee Jones <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
-rw-r--r--drivers/pwm/pwm-stm32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index 60bfc07c4912..09383c6720fb 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -170,7 +170,7 @@ static int stm32_pwm_capture(struct pwm_chip *chip, struct pwm_device *pwm,
unsigned long long prd, div, dty;
unsigned long rate;
unsigned int psc = 0, icpsc, scale;
- u32 raw_prd, raw_dty;
+ u32 raw_prd = 0, raw_dty = 0;
int ret = 0;
mutex_lock(&priv->lock);