forked from Minki/linux
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
This commit is contained in:
commit
acdfffb5e0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user