Merge "usb: gadget: f_gsi: bail out if opts is null"
This commit is contained in:
commit
e3bfd6c700
@ -3544,6 +3544,9 @@ static struct config_item_type gsi_func_rndis_type = {
|
||||
|
||||
static void gsi_inst_clean(struct gsi_opts *opts)
|
||||
{
|
||||
if (!opts)
|
||||
return;
|
||||
|
||||
if (opts->gsi->c_port.cdev.dev) {
|
||||
struct cdev *cdev = &opts->gsi->c_port.cdev;
|
||||
int minor = MINOR(cdev->dev);
|
||||
@ -3626,7 +3629,7 @@ static void gsi_free_inst(struct usb_function_instance *f)
|
||||
enum ipa_usb_teth_prot prot_id;
|
||||
struct f_gsi *gsi;
|
||||
|
||||
if (!opts->gsi)
|
||||
if (!opts || !opts->gsi)
|
||||
return;
|
||||
|
||||
prot_id = opts->gsi->prot_id;
|
||||
|
Loading…
Reference in New Issue
Block a user