]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: encx24j600: Add parentheses to fix precedence
authorValentina Goncharenko <goncharenko.vp@ispras.ru>
Thu, 1 Dec 2022 17:34:07 +0000 (20:34 +0300)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 13:02:56 +0000 (14:02 +0100)
commit245fb4f97574048aef71da7cf51cdd5b20c9d275
treebe91fee1608dafb055e6cc185ddb0e65d2b731c1
parent294dab540e411841e8ba97f4389ad963b9035246
net: encx24j600: Add parentheses to fix precedence

[ Upstream commit 167b3f2dcc62c271f3555b33df17e361bb1fa0ee ]

In functions regmap_encx24j600_phy_reg_read() and
regmap_encx24j600_phy_reg_write() in the conditions of the waiting
cycles for filling the variable 'ret' it is necessary to add parentheses
to prevent wrong assignment due to logical operations precedence.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: d70e53262f5c ("net: Microchip encx24j600 driver")
Signed-off-by: Valentina Goncharenko <goncharenko.vp@ispras.ru>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 8aae746d065c45338f0c5ba47d836eea61edd87f)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
drivers/net/ethernet/microchip/encx24j600-regmap.c