diff options
author | 2021-11-10 09:49:48 +0100 | |
---|---|---|
committer | 2022-02-02 17:03:46 +0100 | |
commit | 0401f24cd238ae200a23a13925f98de3d2c883b8 (patch) | |
tree | 4f44f5b0ee87b1a2d839e1b4f56fce49b3a9f68d /drivers/pwm/pwm-imx1.c | |
parent | pwm: meson: Drop always false check from .apply() (diff) | |
download | wireguard-linux-0401f24cd238ae200a23a13925f98de3d2c883b8.tar.xz wireguard-linux-0401f24cd238ae200a23a13925f98de3d2c883b8.zip |
pwm: lpc18xx-sct: Initialize driver data and hardware before pwmchip_add()
When a driver calls pwmchip_add() it has to be prepared to immediately
get its callbacks called. So move allocation of driver data and hardware
initialization before the call to pwmchip_add().
This fixes a potential NULL pointer exception and a race condition on
register writes.
Fixes: 841e6f90bb78 ("pwm: NXP LPC18xx PWM/SCT driver")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions