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

Commit 61096733 authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa
Browse files

USb: f_qc_rndis: Initialize opts variable in set_alt()



Currently opts variable in rndis_qc_set_alt() is used without
initializing it. This could cause error reported by static analysis
tool. Hence fix this by initializing the variable before accessing it.

Change-Id: I77a42464e351f4e9886250315423ae355ff43617
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent 2f817b68
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -683,6 +683,7 @@ static int rndis_qc_set_alt(struct usb_function *f, unsigned intf, unsigned alt)

	/* we know alt == 0 */

	opts = container_of(f->fi, struct f_rndis_qc_opts, func_inst);
	if (intf == rndis->ctrl_id) {
		if (rndis->notify->driver_data) {
			VDBG(cdev, "reset rndis control %d\n", intf);