diff options
author | Kevin Hilman <khilman@linaro.org> | 2013-08-14 08:14:50 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2013-08-14 08:14:50 -0700 |
commit | 080e3da4f4bf693ec59bd98eae3ee5bd5b1dd047 (patch) | |
tree | 2a367e97dcffe9ced54ff71b03ab893a3248fdb4 /drivers/usb/gadget/f_rndis.c | |
parent | e91f24ae027a583f2faff84456fa2630144bfed8 (diff) | |
parent | 39c41df9c1950fba0ee6a4e7a63be281e89fe437 (diff) |
Merge branch 'zynq/dt' into next/dt
* zynq/dt: (1054 commits)
arm: zynq: dt: Set correct L2 ram latencies
+ v3.11-rc5
Conflicts:
arch/arm/Makefile
Diffstat (limited to 'drivers/usb/gadget/f_rndis.c')
-rw-r--r-- | drivers/usb/gadget/f_rndis.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 191df35ae69..717ed7f9563 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c @@ -963,8 +963,11 @@ static struct usb_function_instance *rndis_alloc_inst(void) mutex_init(&opts->lock); opts->func_inst.free_func_inst = rndis_free_inst; opts->net = gether_setup_default(); - if (IS_ERR(opts->net)) - return ERR_CAST(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, "", &rndis_func_type); |