Vladimir Zapolskiy
5e22217c11
pwm: lpc32xx: Remove handling of PWM channels
...
[ Upstream commit 4aae44f658 ]
Because LPC32xx PWM controllers have only a single output which is
registered as the only PWM device/channel per controller, it is known in
advance that pwm->hwpwm value is always 0. On basis of this fact
simplify the code by removing operations with pwm->hwpwm, there is no
controls which require channel number as input.
Even though I wasn't aware at the time when I forward ported that patch,
this fixes a null pointer dereference as lpc32xx->chip.pwms is NULL
before devm_pwmchip_add() is called.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Fixes: 3d2813fb17 ("pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered")
Signed-off-by: Thierry Reding <thierry.reding@gmail.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2023-09-19 12:22:58 +02:00
..
2023-01-24 07:22:46 +01:00
2023-09-19 12:22:31 +02:00
2023-09-19 12:22:47 +02:00
2023-08-16 18:21:59 +02:00
2023-09-19 12:22:28 +02:00
2023-03-30 12:47:48 +02:00
2023-03-11 13:57:22 +01:00
2023-09-19 12:22:45 +02:00
2023-08-11 15:13:57 +02:00
2023-09-19 12:22:34 +02:00
2023-09-19 12:22:56 +02:00
2023-09-19 12:22:50 +02:00
2023-09-19 12:22:56 +02:00
2023-07-23 13:46:45 +02:00
2023-01-24 07:22:45 +01:00
2023-04-26 13:51:55 +02:00
2023-09-19 12:22:52 +02:00
2023-09-19 12:22:42 +02:00
2023-09-19 12:22:52 +02:00
2023-07-23 13:47:17 +02:00
2023-09-19 12:22:50 +02:00
2022-12-31 13:14:27 +01:00
2023-09-19 12:22:49 +02:00
2023-08-30 16:18:21 +02:00
2023-09-19 12:22:40 +02:00
2023-07-23 13:47:31 +02:00
2023-08-26 14:23:24 +02:00
2023-09-19 12:22:52 +02:00
2023-05-11 23:00:31 +09:00
2023-09-19 12:22:46 +02:00
2023-08-03 10:22:26 +02:00
2023-09-19 12:22:55 +02:00
2023-09-19 12:22:48 +02:00
2022-12-31 13:14:32 +01:00
2023-06-28 10:29:42 +02:00
2023-09-19 12:22:35 +02:00
2023-09-19 12:22:45 +02:00
2023-08-26 14:23:32 +02:00
2023-09-19 12:22:51 +02:00
2023-08-26 14:23:27 +02:00
2023-09-19 12:22:48 +02:00
2023-09-19 12:22:57 +02:00
2023-03-30 12:47:41 +02:00
2023-09-19 12:22:46 +02:00
2023-08-03 10:22:45 +02:00
2023-08-16 18:22:01 +02:00
2023-09-19 12:22:49 +02:00
2023-05-11 23:00:34 +09:00
2023-07-23 13:47:28 +02:00
2023-05-24 17:36:47 +01:00
2023-09-19 12:22:53 +02:00
2023-09-19 12:22:51 +02:00
2023-07-23 13:47:03 +02:00
2023-07-23 13:46:52 +02:00
2023-05-24 17:36:45 +01:00
2023-07-23 13:47:51 +02:00
2023-08-16 18:21:59 +02:00
2023-09-19 12:22:52 +02:00
2023-09-19 12:22:49 +02:00
2023-09-19 12:22:50 +02:00
2023-06-28 10:29:51 +02:00
2023-09-19 12:22:51 +02:00
2023-07-05 18:25:05 +01:00
2023-08-16 18:22:03 +02:00
2023-07-23 13:47:25 +02:00
2023-09-19 12:22:40 +02:00
2023-09-19 12:22:31 +02:00
2023-09-19 12:22:55 +02:00
2023-09-19 12:22:51 +02:00
2023-08-26 14:23:24 +02:00
2023-09-19 12:22:31 +02:00
2023-09-19 12:22:48 +02:00
2023-09-19 12:22:55 +02:00
2023-09-19 12:22:46 +02:00
2023-06-21 15:59:13 +02:00
2023-07-23 13:46:46 +02:00
2023-04-05 11:24:55 +02:00
2023-09-19 12:22:58 +02:00
2023-07-23 13:46:50 +02:00
2023-05-24 17:36:44 +01:00
2023-02-01 08:27:04 +01:00
2023-09-19 12:22:48 +02:00
2023-09-06 21:28:37 +01:00
2023-09-19 12:22:31 +02:00
2023-09-19 12:22:55 +02:00
2023-03-11 13:57:31 +01:00
2023-09-19 12:22:56 +02:00
2023-08-11 15:14:00 +02:00
2023-09-19 12:22:32 +02:00
2023-05-11 23:00:34 +09:00
2023-09-19 12:22:51 +02:00
2023-06-28 10:29:50 +02:00
2023-06-14 11:13:06 +02:00
2023-07-23 13:46:46 +02:00
2023-08-26 14:23:24 +02:00
2023-09-19 12:22:47 +02:00
2022-12-31 13:14:27 +01:00
2023-09-19 12:22:53 +02:00
2023-08-26 14:23:30 +02:00
2023-09-19 12:22:41 +02:00
2023-06-28 10:29:53 +02:00
2023-09-19 12:22:57 +02:00
2023-09-19 12:22:49 +02:00
2022-12-31 13:14:30 +01:00
2023-07-23 13:47:20 +02:00
2023-09-19 12:22:57 +02:00
2023-05-30 13:55:32 +01:00