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

Commit 02663bfe 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: f_cdev: Avoid potential NULL pointer dereference"

parents 1b95c57d 1ed274d0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1770,6 +1770,10 @@ static int cser_set_inst_name(struct usb_function_instance *f, const char *name)

	/* get port number */
	str = strrchr(name, '.');
	if (!str) {
		pr_err("err: port number not found\n");
		return -EINVAL;
	}
	pr_debug("str:%s\n", str);

	*str = '\0';