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

Commit 3efc6ec9 authored by Saket Saurabh's avatar Saket Saurabh
Browse files

usb: gadget: Add NULL check in composite_setup



Add check for usb_function pointer 'f' before accessing its member
f->name in composite_setup()

Change-Id: Ib5c59a65b7ea73f5da11783e71e6a29233b19aa4
Signed-off-by: default avatarSaket Saurabh <ssaurabh@codeaurora.org>
parent 3fd4f55f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1599,7 +1599,7 @@ unknown:
			if (c && c->setup)
				value = c->setup(c, ctrl);
		}
		if (value == USB_GADGET_DELAYED_STATUS) {
		if (f && value == USB_GADGET_DELAYED_STATUS) {
			DBG(cdev,
			 "%s: interface %d (%s) requested delayed status\n",
					__func__, intf, f->name);