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

Commit d573c819 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: Fix NULL pointer dereference in cser_free_inst"

parents 40b99c3f adce509c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -823,8 +823,10 @@ static void cser_free_inst(struct usb_function_instance *fi)

	opts = container_of(fi, struct f_cdev_opts, func_inst);

	if (opts->port) {
		device_destroy(fcdev_classp, MKDEV(major, opts->port->minor));
		cdev_del(&opts->port->fcdev_cdev);
	}
	usb_cser_chardev_deinit();
	kfree(opts->func_name);
	kfree(opts->port);