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

Commit a6d83d2e 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: Fix null pointer crash issue in gsi_free_inst"

parents f272bb9c 99392dcd
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -3007,6 +3007,9 @@ static void gsi_free_inst(struct usb_function_instance *f)
{
{
	struct gsi_opts *opts = container_of(f, struct gsi_opts, func_inst);
	struct gsi_opts *opts = container_of(f, struct gsi_opts, func_inst);


	if (!opts->gsi)
		return;

	if (opts->gsi->c_port.ctrl_device.fops)
	if (opts->gsi->c_port.ctrl_device.fops)
		misc_deregister(&opts->gsi->c_port.ctrl_device);
		misc_deregister(&opts->gsi->c_port.ctrl_device);