]> git.baikalelectronics.ru Git - kernel.git/commit
clk: sunxi-ng: a80: fix the zero'ing of bits 16 and 18
authorColin Ian King <colin.king@canonical.com>
Wed, 23 Oct 2019 11:28:09 +0000 (12:28 +0100)
committerMaxime Ripard <mripard@kernel.org>
Tue, 29 Oct 2019 07:42:52 +0000 (08:42 +0100)
commitf92ec067fc4d3ea218b0449289cc0dea3535999c
tree5541768f3b3232aa5f38ba3bd77e5e4194e45d34
parentfd845929c1ff04cc157652fc6e0077b4899c3fd2
clk: sunxi-ng: a80: fix the zero'ing of bits 16 and 18

The zero'ing of bits 16 and 18 is incorrect. Currently the code
is masking with the bitwise-and of BIT(16) & BIT(18) which is
0, so the updated value for val is always zero. Fix this by bitwise
and-ing value with the correct mask that will zero bits 16 and 18.

Addresses-Coverity: (" Suspicious &= or |= constant expression")
Fixes: 7986b04babb0 ("clk: sunxi-ng: Add A80 CCU")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/clk/sunxi-ng/ccu-sun9i-a80.c