usb:Balance the enable/disable in secure mode
authora17671 <a17671@motorola.com>
Fri, 8 Nov 2019 02:48:21 +0000 (10:48 +0800)
committerZonghua Liu <a17671@motorola.com>
Fri, 8 Nov 2019 03:19:01 +0000 (21:19 -0600)
commit18a3b1021c790bbeb8e83c764268becb2eb149de
tree6db9bf64656f7c6a88ab62da5793aa3836e179ac
parentebcf5e86af676e11db44681e6d07457a4e5b3393
usb:Balance the enable/disable in secure mode

Enable/Disable shall be banlanced when USB in secure mode
Otherwise the linked_func and func_list could be messed up
That will cause the unbinding release the wild memory
This is a Samsung platform only issue,kernel panic
Has the following mark:

configfs-gadget gadget:unbind function 'mtp'
configfs-gadget gadget:unbind function 'ptp'

Which shall not happen, since user could not choose
Both mtp and ptp together

Change-Id: I4aba691a0c4180f828c55aad5d63b9162c3f881a
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1451197
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
drivers/usb/gadget/configfs.c