Skip to content

Commit

Permalink
drm/nouveau/i2c: drop parent refcount when creating ports
Browse files Browse the repository at this point in the history
Fixes issue where i2c subdev never gets destroyed due to its subobjects
holding references.  This will mean the i2c subdev refcount goes
negative during its destruction, but this isn't an issue in practice.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Mar 4, 2013
1 parent 67f9718 commit 42bed34
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ nouveau_i2c_port_create_(struct nouveau_object *parent,
/* drop port's i2c subdev refcount, i2c handles this itself */
if (ret == 0) {
list_add_tail(&port->head, &i2c->ports);
atomic_dec(&parent->refcount);
atomic_dec(&engine->refcount);
}

Expand Down

0 comments on commit 42bed34

Please sign in to comment.