aboutsummaryrefslogtreecommitdiff
path: root/drivers/firmware/dmi-id.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/dmi-id.c')
-rw-r--r--drivers/firmware/dmi-id.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
index a777a35381d..94a58a082b9 100644
--- a/drivers/firmware/dmi-id.c
+++ b/drivers/firmware/dmi-id.c
@@ -229,10 +229,12 @@ static int __init dmi_id_init(void)
ret = device_register(dmi_dev);
if (ret)
- goto fail_class_unregister;
+ goto fail_free_dmi_dev;
return 0;
+fail_free_dmi_dev:
+ kfree(dmi_dev);
fail_class_unregister:
class_unregister(&dmi_class);