adapter: Set the DEP flag to false when a device is removed
authorSamuel Ortiz <sameo@linux.intel.com>
Thu, 31 May 2012 17:51:24 +0000 (19:51 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 31 May 2012 17:51:24 +0000 (19:51 +0200)
src/adapter.c

index b6f11bb..3fb59ee 100644 (file)
@@ -809,11 +809,10 @@ int __near_adapter_remove_device(uint32_t idx)
                return -ENODEV;
 
        if (g_hash_table_remove(adapter->devices,
-                       GINT_TO_POINTER(device_idx)) == TRUE) {
-               __near_adapter_devices_changed(idx);
-
+                       GINT_TO_POINTER(device_idx)) == FALSE)
                return 0;
-       }
+
+       __near_adapter_devices_changed(idx);
 
        adapter->dep_up = FALSE;