Skip to content

Commit f765c59

Browse files
Jiapeng Chongvinodkoul
authored andcommitted
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: Abaci Robot <[email protected]> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3962 Signed-off-by: Jiapeng Chong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 4315eab commit f765c59

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/phy/rockchip/phy-rockchip-typec.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,9 +808,8 @@ static int tcphy_get_mode(struct rockchip_typec_phy *tcphy)
808808
struct extcon_dev *edev = tcphy->extcon;
809809
union extcon_property_value property;
810810
unsigned int id;
811-
bool ufp, dp;
812811
u8 mode;
813-
int ret;
812+
int ret, ufp, dp;
814813

815814
if (!edev)
816815
return MODE_DFP_USB;

0 commit comments

Comments
 (0)