Commit f765c59c authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Vinod Koul

phy: rockchip-typec: Fix unsigned comparison with less than zero

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: default avatarAbaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3962Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230213035709.99027-1-jiapeng.chong@linux.alibaba.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 4315eab7
......@@ -808,9 +808,8 @@ static int tcphy_get_mode(struct rockchip_typec_phy *tcphy)
struct extcon_dev *edev = tcphy->extcon;
union extcon_property_value property;
unsigned int id;
bool ufp, dp;
u8 mode;
int ret;
int ret, ufp, dp;
if (!edev)
return MODE_DFP_USB;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment