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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:19:39 +0000 (09:19 +0100)
commit40017db20bfabfce650fc588f144f57b8a7da092
treeb4293e7b892c23d9dadc4ce7dfe652c2c6de7908
parent49ade064ea4b2836e1933fb8aa4c152ebecab6ab
clk: sunxi-ng: a80: fix the zero'ing of bits 16 and 18

[ Upstream commit cdfc2e2086bf9c465f44e2db25561373b084a113 ]

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: b8eb71dcdd08 ("clk: sunxi-ng: Add A80 CCU")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/sunxi-ng/ccu-sun9i-a80.c