diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-29 21:30:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-29 21:30:13 +0200 |
commit | b78b6b3a9af239549ea863e085223d1d4f65a608 (patch) | |
tree | fb55713cba98edd270df2c54a7590a2be7e1be10 /drivers/usb/gadget/f_ecm.c | |
parent | net: ieee802154: convert class code to use dev_groups (diff) | |
parent | Linux 3.11-rc3 (diff) | |
download | linux-b78b6b3a9af239549ea863e085223d1d4f65a608.tar.xz linux-b78b6b3a9af239549ea863e085223d1d4f65a608.zip |
Merge 3.11-rc3 into driver-core-next
We want these fixes in this branch.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/f_ecm.c')
-rw-r--r-- | drivers/usb/gadget/f_ecm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c index 5d3561ea1c15..edab45da3741 100644 --- a/drivers/usb/gadget/f_ecm.c +++ b/drivers/usb/gadget/f_ecm.c @@ -959,8 +959,11 @@ static struct usb_function_instance *ecm_alloc_inst(void) mutex_init(&opts->lock); opts->func_inst.free_func_inst = ecm_free_inst; opts->net = gether_setup_default(); - if (IS_ERR(opts->net)) - return ERR_PTR(PTR_ERR(opts->net)); + if (IS_ERR(opts->net)) { + struct net_device *net = opts->net; + kfree(opts); + return ERR_CAST(net); + } config_group_init_type_name(&opts->func_inst.group, "", &ecm_func_type); |