diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-08 12:19:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-08 12:19:24 -0700 |
commit | acdfffb5e003858e0f4a70525101f584e393323e (patch) | |
tree | 3b7f4d294a198d0eab968d5038175bc65a2739b2 /drivers/firmware | |
parent | e8b3b45de89117729cdc1a6b29da85500e4af7db (diff) | |
parent | 9b41b92bbae6a4d3e1f3adde87864fd481037814 (diff) | |
download | linux-acdfffb5e003858e0f4a70525101f584e393323e.tar.bz2 |
Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull dmi fix from Jean Delvare.
* 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
dmi-id: don't free dev structure after calling device_register
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/dmi-id.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c index 94a58a082b99..44c01390d035 100644 --- a/drivers/firmware/dmi-id.c +++ b/drivers/firmware/dmi-id.c @@ -229,14 +229,14 @@ static int __init dmi_id_init(void) ret = device_register(dmi_dev); if (ret) - goto fail_free_dmi_dev; + goto fail_put_dmi_dev; return 0; -fail_free_dmi_dev: - kfree(dmi_dev); -fail_class_unregister: +fail_put_dmi_dev: + put_device(dmi_dev); +fail_class_unregister: class_unregister(&dmi_class); return ret; |