> On January 21, 2014 at 3:46 AM kallisti5@xxxxxxxxxxx wrote: > mutex_lock(&gLock); > > - if (info->open_count == 0) { > + if (info->open_count++ == 0) { > // this device has been opened for the first time, so > // we allocate needed resources and initialize the structure > info->init_status = radeon_hd_init(*info); > if (info->init_status == B_OK) { > - info->open_count++; This is wrong, too, though: if the initialization fails, the open count is never decreased anymore, as close() is only called when open() succeeds. Bye, Axel.