[zaptel-commits] tzafrir: trunk r1731 - in /trunk/xpp: ./ xpp_zap.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Mon Dec 18 07:03:26 MST 2006
Author: tzafrir
Date: Mon Dec 18 08:03:26 2006
New Revision: 1731
URL: http://svn.digium.com/view/zaptel?view=rev&rev=1731
Log:
r1727 at boole: tzafrir | 2006-12-18 15:59:13 +0200
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:
trunk/xpp/ (props changed)
trunk/xpp/xpp_zap.c
Propchange: trunk/xpp/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Mon Dec 18 08:03:26 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.4/xpp:1726
+f558416c-6c06-0410-9f27-dde2687782d0:/branches/1.2/xpp:1722
+f558416c-6c06-0410-9f27-dde2687782d0:/branches/1.4/xpp:1727
f558416c-6c06-0410-9f27-dde2687782d0:/team/tzafrir/xpp_1.2/xpp:1554
Modified: trunk/xpp/xpp_zap.c
URL: http://svn.digium.com/view/zaptel/trunk/xpp/xpp_zap.c?view=diff&rev=1731&r1=1730&r2=1731
==============================================================================
--- trunk/xpp/xpp_zap.c (original)
+++ trunk/xpp/xpp_zap.c Mon Dec 18 08:03:26 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