isdn/capi: unregister capictr notifier after init failure

capidrv_init() could leave capictr notifier dangling after init
failure.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Jan Kiszka <jan.kiszka@web.de>
This commit is contained in:
Tejun Heo 2010-12-24 15:59:05 +01:00
parent c8efcc2589
commit 7fa5e85a0a

View File

@ -2297,6 +2297,7 @@ static int __init capidrv_init(void)
errcode = capi20_get_profile(0, &profile);
if (errcode != CAPI_NOERROR) {
unregister_capictr_notifier(&capictr_nb);
capi20_release(&global.ap);
return -EIO;
}