[PATCH v2.6.36-rc7 1/2] isdn/capi: unregister capictr notifier afterinit failure

From: Tejun Heo
Date: Fri Oct 15 2010 - 08:43:18 EST


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

Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
---
drivers/isdn/capi/capidrv.c | 1 +
1 file changed, 1 insertion(+)

Index: work/drivers/isdn/capi/capidrv.c
===================================================================
--- work.orig/drivers/isdn/capi/capidrv.c
+++ work/drivers/isdn/capi/capidrv.c
@@ -2288,6 +2288,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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/