diff options
author | Li Jun <jun.li@nxp.com> | 2019-07-17 16:06:46 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-30 11:04:09 +0200 |
commit | 12ca7297b8855c0af1848503d37196159b24e6b9 (patch) | |
tree | 1739531a98a55c571746cef46560321892b97718 /drivers/usb/misc | |
parent | fd5da3e2cc61b4a7c877172fdc9348c82cf6ccfc (diff) | |
download | linux-12ca7297b8855c0af1848503d37196159b24e6b9.tar.bz2 |
usb: typec: tcpm: remove tcpm dir if no children
If config tcpm as module, module unload will not remove tcpm dir,
then the next module load will have problem: the rootdir is NULL
but tcpm dir is still there, so tcpm_debugfs_init() will create
tcpm dir again with failure, fix it by remove the tcpm dir if no
children.
Cc: stable@vger.kernel.org # v4.15+
Fixes: 4b4e02c83167 ("typec: tcpm: Move out of staging")
Signed-off-by: Li Jun <jun.li@nxp.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20190717080646.30421-2-jun.li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
0 files changed, 0 insertions, 0 deletions