mirror of
https://github.com/gnif/vendor-reset.git
synced 2026-06-27 14:04:30 +02:00
[core] properly handle failure to register hooks
This commit is contained in:
+5
-1
@@ -161,12 +161,16 @@ static int __init vendor_reset_init(void)
|
|||||||
{
|
{
|
||||||
ret = fh_install_hooks(fh_hooks);
|
ret = fh_install_hooks(fh_hooks);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err;
|
||||||
|
|
||||||
vr_info("Hooks installed successfully\n");
|
vr_info("Hooks installed successfully\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err:
|
||||||
|
misc_deregister(&vendor_reset_misc);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit vendor_reset_exit(void)
|
static void __exit vendor_reset_exit(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user