PNP / card: add missing put_device() call
authorLevente Kurusa <levex@linux.com>
Thu, 19 Dec 2013 15:03:36 +0000 (16:03 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 5 Jan 2014 21:50:06 +0000 (22:50 +0100)
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>
drivers/pnp/card.c

index bc00693..874c236 100644 (file)
@@ -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;
        }