Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e34f595a authored by Jack Pham's avatar Jack Pham
Browse files

usb: pd: Add missing 'break' when handling VCONN_Swap



The switch case for handling VCONN_Swap within SNK_Ready state
was missing a 'break' statement, which allows the control flow
to inadvertently fall through the Get_Source_Caps_Extended
handling and causes an unexpected Source_Capabilities_Extended
message to get sent out. This could lead to the port partner
responding with a Not_Supported or worse, cause a soft/hard reset.

Change-Id: I6919c33bc2c89b08f605cb2c44c699a76402e112
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 679dfb32
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2871,6 +2871,7 @@ static bool handle_ctrl_snk_ready(struct usbpd *pd, struct rx_msg *rx_msg)
			break;
		}
		vconn_swap(pd);
		break;
	case MSG_GET_SOURCE_CAP_EXTENDED:
		handle_get_src_cap_extended(pd);
		break;