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

Commit dd49093e authored by Maya Erez's avatar Maya Erez
Browse files

usb: bam: Fix KW error for accessing unchecked index



idx was accessed in the variable declaration line before it is checked
at a later point.
Remove the early access to idx.

CRs-Fixed: 629914
Change-Id: I5e574a09bf5c367b708168432c3a646a0f5979af
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent 602a0bb9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2469,7 +2469,7 @@ static void usb_bam_ack_toggle_cb(void *priv,
static int __usb_bam_register_wake_cb(int idx, int (*callback)(void *user),
	void *param, bool trigger_cb_per_pipe)
{
	struct sps_pipe *pipe = ctx.usb_bam_sps.sps_pipes[idx];
	struct sps_pipe *pipe;
	struct sps_connect *sps_connection;
	struct usb_bam_pipe_connect *pipe_connect;
	struct usb_bam_event_info *wake_event_info;