summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 46d5568d..e9454603 100644
--- a/src/main.c
+++ b/src/main.c
@@ -484,7 +484,10 @@ static void device_devup_setup(int dev_id)
configure_device(dev_id);
start_security_manager(dev_id);
- manager_start_adapter(dev_id);
+
+ /* Return value 1 means ioctl(DEVDOWN) was performed */
+ if (manager_start_adapter(dev_id) == 1)
+ stop_security_manager(dev_id);
}
static void init_all_devices(int ctl)