Skip to content

Commit

Permalink
PNP / card: add missing put_device() call
Browse files Browse the repository at this point in the history
This is required so that we give up the last reference to the device.

Signed-off-by: Levente Kurusa <levex@linux.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
levex authored and rafaeljw committed Jan 5, 2014
1 parent 249135d commit 75365d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pnp/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ int pnp_add_card(struct pnp_card *card)
error = device_register(&card->dev);
if (error) {
dev_err(&card->dev, "could not register (err=%d)\n", error);
put_device(&card->dev);
return error;
}

Expand Down

0 comments on commit 75365d0

Please sign in to comment.