[zaptel-commits] tzafrir: branch 1.4 r1727 - in /branches/1.4/xpp:
./ xpp_zap.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Mon Dec 18 06:59:13 MST 2006
Author: tzafrir
Date: Mon Dec 18 07:59:13 2006
New Revision: 1727
URL: http://svn.digium.com/view/zaptel?view=rev&rev=1727
Log:
r1722 at boole: tzafrir | 2006-12-18 15:50:36 +0200
xpp_zap.c: Better error hanlding during module init.
orig r2948: oron | 2006-12-17 18:54:00 +0200
Modified:
branches/1.4/xpp/ (props changed)
branches/1.4/xpp/xpp_zap.c
Propchange: branches/1.4/xpp/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Mon Dec 18 07:59:13 2006
@@ -1,5 +1,5 @@
283159da-0705-0410-b60c-f2062b4bb6ad:/components/xpp-zaptel/branches/RELEASE-1.2.0/xpp:2933
283159da-0705-0410-b60c-f2062b4bb6ad:/components/xpp-zaptel/trunk/xpp:2830
-f558416c-6c06-0410-9f27-dde2687782d0:/branches/1.2/xpp:1721
+f558416c-6c06-0410-9f27-dde2687782d0:/branches/1.2/xpp:1722
f558416c-6c06-0410-9f27-dde2687782d0:/team/tzafrir/xpp_1.2/xpp:1554
f558416c-6c06-0410-9f27-dde2687782d0:/trunk/xpp:1453
Modified: branches/1.4/xpp/xpp_zap.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/xpp/xpp_zap.c?view=diff&rev=1727&r1=1726&r2=1727
==============================================================================
--- branches/1.4/xpp/xpp_zap.c (original)
+++ branches/1.4/xpp/xpp_zap.c Mon Dec 18 07:59:13 2006
@@ -1445,8 +1445,8 @@
int __init xpp_zap_init(void)
{
- int ret;
- struct proc_dir_entry *ent;
+ int ret = 0;
+ struct proc_dir_entry *ent;
INFO("%s revision %s MAX_XPDS=%d (%d*%d)\n", THIS_MODULE->name, ZAPTEL_VERSION,
MAX_XPDS, MAX_UNIT, MAX_SUBUNIT);
@@ -1468,14 +1468,14 @@
#ifdef CONFIG_PROC_FS
xpp_proc_toplevel = proc_mkdir(PROC_DIR, NULL);
if(!xpp_proc_toplevel) {
- do_cleanup();
- return -EIO;
+ ret = -EIO;
+ goto err;
}
ent = create_proc_entry(PROC_SYNC, 0644, xpp_proc_toplevel);
if(!ent) {
- do_cleanup();
- return -EFAULT;
+ ret = -EFAULT;
+ goto err;
}
ent->read_proc = proc_sync_read;
ent->write_proc = proc_sync_write;
@@ -1484,14 +1484,16 @@
ret = xbus_core_init();
if(ret) {
ERR("xbus_core_init failed (%d)\n", ret);
- do_cleanup();
- return ret;
+ goto err;
}
/* Only timer init. We add it only *after* zt_register */
init_timer(&xpp_timer);
sync_master_is(NULL); /* Internal ticking */
return 0;
+err:
+ do_cleanup();
+ return ret;
}
void __exit xpp_zap_cleanup(void)
More information about the zaptel-commits
mailing list