summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/f_phonet.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-08-30 06:12:04 +0400
committerOlof Johansson <olof@lixom.net>2013-08-30 06:12:04 +0400
commit2bbc31ef2b398d17016c6438016cc76913990950 (patch)
tree10de572013948341054d73acfab0f6d77ae35cbd /drivers/usb/gadget/f_phonet.c
parenta3e008d1b5e39abe81e233bde623604841ff9a73 (diff)
parentaf0721966195b3966214edd54af0d5f84d65419a (diff)
downloadlinux-2bbc31ef2b398d17016c6438016cc76913990950.tar.xz
Merge tag 'omap-for-v3.12/fixes-non-critical-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/fixes-non-critical
From Tony Lindgren: Omap fixes for the merge window that are not urgent enough for the -rc series. * tag 'omap-for-v3.12/fixes-non-critical-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2: use 'int' instead of 'unsigned' for variable 'gpmc_irq_start' ARM: OMAP2: remove useless variable 'ret' ARM: OMAP: dma: fix error return code in omap_system_dma_probe() ARM: OMAP2+: fix wrong address when loading PRM_FRAC_INCREMENTOR_DENUMERATOR_RELOAD ARM: OMAP2+: am33xx-restart: trigger warm reset on omap2+ boards ARM: OMAP2: Use a consistent AM33XX SoC option description ARM: OMAP2+: Remove legacy device creation for McPDM and DMIC + Linux 3.11-rc6
Diffstat (limited to 'drivers/usb/gadget/f_phonet.c')
-rw-r--r--drivers/usb/gadget/f_phonet.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index 7944fb0efe3b..eb3aa817a662 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -488,7 +488,6 @@ static int pn_bind(struct usb_configuration *c, struct usb_function *f)
struct usb_ep *ep;
int status, i;
-#ifndef USBF_PHONET_INCLUDED
struct f_phonet_opts *phonet_opts;
phonet_opts = container_of(f->fi, struct f_phonet_opts, func_inst);
@@ -507,7 +506,6 @@ static int pn_bind(struct usb_configuration *c, struct usb_function *f)
return status;
phonet_opts->bound = true;
}
-#endif
/* Reserve interface IDs */
status = usb_interface_id(c, f);
@@ -656,8 +654,11 @@ static struct usb_function_instance *phonet_alloc_inst(void)
opts->func_inst.free_func_inst = phonet_free_inst;
opts->net = gphonet_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, "",
&phonet_func_type);