summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/card.c
diff options
context:
space:
mode:
authorLevente Kurusa <levex@linux.com>2013-12-19 16:03:36 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-05 22:50:06 +0100
commit75365d04cd2d6fe04c9c52c69fd97b2d0a6c82ba (patch)
tree1ed9a54c7c2eceb5062585e4c6df00db3b8ac319 /drivers/pnp/card.c
parent249135d1a2ea3c1719c48d31351413d55d2fdef4 (diff)
downloadlinux-75365d04cd2d6fe04c9c52c69fd97b2d0a6c82ba.tar.bz2
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>
Diffstat (limited to 'drivers/pnp/card.c')
-rw-r--r--drivers/pnp/card.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index bc00693d0c79..874c236ac1a7 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -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;
}