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

Commit 0739231d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: Add NULL check in str_to_xport"

parents 1ec33670 01394650
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -60,6 +60,9 @@ static char *xport_to_str(enum transport_type t)

static enum transport_type str_to_xport(const char *name)
{
	if (!name)
		return USB_GADGET_XPORT_UNDEF;

	if (!strncasecmp("TTY", name, XPORT_STR_LEN))
		return USB_GADGET_XPORT_TTY;
	if (!strncasecmp("SMD", name, XPORT_STR_LEN))