usb: gadget: u_uac1: fix build issue
PATCH 1/4 usb: gadget: u_uac1: fix build issue
Since gaudio member is removed at f_uac1_opts, it also needs to remove the cleanup call of gaudio member at f_uac1_opts when the usb function instance is freed.
See below error message:
CC [M] drivers/gpu/drm/nouveau/core/subdev/vm/nv50.o
CC [M] drivers/staging/lustre/lnet/selftest/module.odrivers/usb/gadget/function/f_uac1.c: In function ‘f_audio_free_inst’:drivers/usb/gadget/function/f_uac1.c:904:21: error: ‘struct f_uac1_opts’ has no member named ‘card’
gaudio_cleanup(opts->card);
^make[4]: *** [drivers/usb/gadget/function/f_uac1.o] Error 1 make[3]: *** [drivers/usb/gadget/function] Error 2 make[2]: *** [drivers/usb/gadget] Error 2
make[2]: *** Waiting for unfinished jobs....
CC [M] drivers/staging/lustre/lnet/selftest/ping_test.o
---
Felipe,
As mentioned at previous mail, this fix is for your current testing/next branch.
Thanks,
Rui
---
drivers/usb/gadget/function/f_uac1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/f_uac1.c +1 -1
@@ -901,7 +901,7 @@ static void f_audio_free_inst(struct usb_function_instance *f)struct f_uac1_opts *opts; opts = container_of(f, struct f_uac1_opts, func_inst); -gaudio_cleanup (opts->card); +if (opts->fn_play_alloc)kfree (opts->fn_play);if (opts->fn_cap_alloc)
Signature · 1 line
1.9.1
Quoted 15 lines
See below error message:
CC [M]drivers/gpu/drm/nouveau/core/subdev/vm/nv50.o
CC [M]drivers/staging/lustre/lnet/selftest/module.odrivers/usb/gadget/function/f_uac1.c: In function ‘f_audio_free_inst’:drivers/usb/gadget/function/f_uac1.c:904:21: error: ‘struct f_uac1_opts’ has no member named ‘card’gaudio_cleanup(opts->card); ^make[4]: *** [
drivers/usb/gadget/function/f_uac1.o] Error 1 make[3]: *** [drivers/usb/gadget/function] Error 2 make[2]: *** [drivers/usb/gadget] Error 2
make[2]: *** Waiting for unfinished jobs....
CC [M]drivers/staging/lustre/lnet/selftest/ping_test.o
Quoted 4 lines
Signed-off-by Huang Rui <[email protected]>Cc Peter Chen <[email protected]>---
Oh, my three patches have dependencies, it needs to rebase Felipe's fixes tree to fix this problem.
commit 4fde6204df052bb89ba3d915ed6ed9f306f3cfa1
Author: Peter Chen <[email protected]> Date: Mon Dec 1 16:09:27 2014 +0800
usb: gadget: f_uac1: access freed memory at f_audio_free_inst
Peter
���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�
Quoted 23 lines · Peter Chen
Quoted 15 lines
See below error message:
CC [M]drivers/gpu/drm/nouveau/core/subdev/vm/nv50.o
CC [M]drivers/staging/lustre/lnet/selftest/module.odrivers/usb/gadget/function/f_uac1.c: In function ‘f_audio_free_inst’:drivers/usb/gadget/function/f_uac1.c:904:21: error: ‘struct f_uac1_opts’ has no member named ‘card’gaudio_cleanup(opts->card); ^make[4]: *** [
drivers/usb/gadget/function/f_uac1.o] Error 1 make[3]: *** [drivers/usb/gadget/function] Error 2 make[2]: *** [drivers/usb/gadget] Error 2
make[2]: *** Waiting for unfinished jobs....
CC [M]drivers/staging/lustre/lnet/selftest/ping_test.oQuoted 4 lines
Signed-off-by Huang Rui <[email protected]>Cc Peter Chen <[email protected]>---
Oh, my three patches have dependencies, it needs to rebase Felipe's fixes tree to fix this problem.
commit
4fde6204df052bb89ba3d915ed6ed9f306f3cfa1
Quoted 9 lines
Author: Peter Chen <[email protected]> Date: Mon Dec 1 16:09:27 2014 +0800usb: gadget:
f_uac1: access freed memory atf_audio_free_instPeter
I see, that's OK. :)
Thanks,
Rui
Hi,
Quoted 20 lines · Peter Chen
Quoted 15 lines
See below error message:
CC [M]drivers/gpu/drm/nouveau/core/subdev/vm/nv50.o
CC [M]drivers/staging/lustre/lnet/selftest/module.odrivers/usb/gadget/function/f_uac1.c: In function ‘f_audio_free_inst’:drivers/usb/gadget/function/f_uac1.c:904:21: error: ‘struct f_uac1_opts’ has no member named ‘card’gaudio_cleanup(opts->card); ^make[4]: *** [
drivers/usb/gadget/function/f_uac1.o] Error 1 make[3]: *** [drivers/usb/gadget/function] Error 2 make[2]: *** [drivers/usb/gadget] Error 2
make[2]: *** Waiting for unfinished jobs....
CC [M]drivers/staging/lustre/lnet/selftest/ping_test.oQuoted 4 lines
Signed-off-by Huang Rui <[email protected]>Cc Peter Chen <[email protected]>---
Quoted 8 lines
Oh, my three patches have dependencies, it needs to rebase Felipe's fixes tree to fix this problem.
commit
4fde6204df052bb89ba3d915ed6ed9f306f3cfa1Author: Peter Chen <[email protected]> Date: Mon Dec 1 16:09:27 2014 +0800usb: gadget:
f_uac1: access freed memory atf_audio_free_inst
Yeah, once that gets merged by Linus, I'll merge v3.19-rc5 on my next branch, that should sort it all out.
This is one great example of why you should never make new features depend on fixes. We will always sort out the merge conflicts later.
Signature · 1 line
balbi