Skip to content

Commit 75365d0

Browse files
levexrafaeljw
authored andcommitted
PNP / card: add missing put_device() call
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>
1 parent 249135d commit 75365d0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/pnp/card.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ int pnp_add_card(struct pnp_card *card)
239239
error = device_register(&card->dev);
240240
if (error) {
241241
dev_err(&card->dev, "could not register (err=%d)\n", error);
242+
put_device(&card->dev);
242243
return error;
243244
}
244245

0 commit comments

Comments
 (0)