Files
kernel_xiaomi_violet/include/linux
Dan Carpenter bce1f7c7e9 pwm: Fix double shift bug
[ Upstream commit d27abbfd4888d79dd24baf50e774631046ac4732 ]

These enums are passed to set/test_bit().  The set/test_bit() functions
take a bit number instead of a shifted value.  Passing a shifted value
is a double shift bug like doing BIT(BIT(1)).  The double shift bug
doesn't cause a problem here because we are only checking 0 and 1 but
if the value was 5 or above then it can lead to a buffer overflow.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 16:45:44 +00:00
..
2022-10-26 13:17:05 +02:00
2018-02-22 15:42:23 +01:00
2017-08-30 14:40:40 +02:00
2023-08-08 19:48:23 +02:00
2018-08-03 07:50:38 +02:00
2017-08-24 13:23:03 -07:00
2019-11-24 08:22:48 +01:00
2021-12-08 08:46:55 +01:00
2020-04-02 16:34:21 +02:00
2018-02-22 15:42:24 +01:00
2022-10-26 13:17:08 +02:00
2019-12-17 20:38:50 +01:00
2021-03-03 18:22:46 +01:00
2022-08-25 11:11:25 +02:00
2021-02-07 14:47:41 +01:00
2017-09-07 11:53:11 +02:00
2019-12-31 12:37:21 +01:00
2021-07-11 12:48:09 +02:00
2018-02-22 15:42:23 +01:00
2023-06-21 15:38:58 +02:00
2017-09-25 08:56:05 -06:00
2020-03-20 10:54:12 +01:00
2019-06-11 12:21:48 +02:00
2023-11-28 16:45:44 +00:00
2020-04-02 16:34:36 +02:00
2018-11-13 11:15:11 -08:00
2020-04-02 16:34:36 +02:00
2017-08-31 18:50:14 +02:00
2021-12-14 10:16:55 +01:00