]> git.baikalelectronics.ru Git - kernel.git/commit
netdevsim: remove dir in nsim_dev_debugfs_init() when creating ports dir failed
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 26 Oct 2022 01:46:42 +0000 (09:46 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Oct 2022 17:47:29 +0000 (10:47 -0700)
commitb182273990b2b43b4497c64f4916d226db0873f7
tree7078a8364f64a5652277d3d7a0c8daaf013d632d
parent95c0934cd1c86364685825821ad18ab44ea157c1
netdevsim: remove dir in nsim_dev_debugfs_init() when creating ports dir failed

Remove dir in nsim_dev_debugfs_init() when creating ports dir failed.
Otherwise, the netdevsim device will not be created next time. Kernel
reports an error: debugfs: Directory 'netdevsim1' with parent 'netdevsim'
already present!

Fixes: 67737eb43aac ("netdevsim: change debugfs tree topology")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/netdevsim/dev.c