[haiku-commits] Re: haiku: hrev46725 - in src/add-ons/kernel/drivers/graphics: radeon_hd intel_extreme

  • From: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 27 Jan 2014 13:31:18 -0600

On Tue, 21 Jan 2014 10:07:31 +0100 (CET)
Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:

> > 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.

Whoops. forgot about this one. Will work on it this afternoon.

Other related posts: