usb:Balance the enable/disable in secure mode pie-9.0.0-release-psb29 MMI-PSA29.160-55-7 MMI-PSB29.39-49-7
authora17671 <a17671@motorola.com>
Fri, 8 Nov 2019 02:43:52 +0000 (10:43 +0800)
committerLu Lu <lulu2@lenovo.com>
Fri, 8 Nov 2019 04:18:40 +0000 (22:18 -0600)
commit99c2a58c2aab7970728a876cc7db18a68f90a5be
tree127350606126deb8346a2503f1dff2a983c3a5f8
parent2a0c58635139d904308de9e557f69199210523a6
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: Ic02e372cbb9774976806321ba6207560ee4f7947
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1451190
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 01e40a70688aaed4648619a5f358be665d08d878)
Reviewed-on: https://gerrit.mot.com/1451232
Reviewed-by: Lu Lu <lulu2@mt.com>
SME-Granted: Lu Lu <lulu2@mt.com>
Submit-Approved: Lu Lu <lulu2@mt.com>
drivers/usb/gadget/configfs.c