mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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>
This commit is contained in:
parent
249135d1a2
commit
75365d04cd
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue