Skip to content
Commit 4f5f21cf authored by Li Jun's avatar Li Jun Committed by Greg Kroah-Hartman
Browse files

usb: typec: tcpm: remove tcpm dir if no children



commit 12ca7297 upstream.

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: 4b4e02c8 ("typec: tcpm: Move out of staging")
Signed-off-by: default avatarLi Jun <jun.li@nxp.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20190717080646.30421-2-jun.li@nxp.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ba2bf3ba
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment