]> git.baikalelectronics.ru Git - kernel.git/commit
phy: rockchip-typec: Fix unsigned comparison with less than zero
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Mon, 13 Feb 2023 03:57:09 +0000 (11:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:40 +0000 (13:55 +0100)
commit7c686cb58d400cb5783c91b0807fa2d1b99e2ea4
tree335dca0fbebeab1a9ddabaac3aafe58ae7106aa3
parent064a39534a808d76338074917dfc0e775fd694b0
phy: rockchip-typec: Fix unsigned comparison with less than zero

[ Upstream commit 7110c2fa9ed6f864986b26321f96be39dbfb1757 ]

The dp and ufp are defined as bool type, the return value type of
function extcon_get_state should be int, so the type of dp and ufp
are modified to int.

./drivers/phy/rockchip/phy-rockchip-typec.c:827:12-14: WARNING: Unsigned expression compared with zero: dp > 0.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3962
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230213035709.99027-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/rockchip/phy-rockchip-typec.c