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

Commit 149a269c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: gsi: Avoid accessing an uninitialized variable"

parents fa98c03b f7df4abf
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -207,12 +207,12 @@ static struct f_gsi *get_connected_gsi(void)
	int i;

	for (i = 0; i < IPA_USB_MAX_TETH_PROT_SIZE; i++) {
		if (inst_status[i].opts)
		if (inst_status[i].opts) {
			connected_gsi = inst_status[i].opts->gsi;

			if (connected_gsi && atomic_read(&connected_gsi->connected))
				return connected_gsi;
		}
	}

	return NULL;
}