Merge "usb: gadget: Fix null pointer crash issue in gsi_free_inst"
This commit is contained in:
commit
a6d83d2e8e
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
||||
if (!opts->gsi)
|
||||
return;
|
||||
|
||||
if (opts->gsi->c_port.ctrl_device.fops)
|
||||
misc_deregister(&opts->gsi->c_port.ctrl_device);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue