patch-2.4.0-prerelease linux/drivers/atm/horizon.c
Next file: linux/drivers/atm/iphase.c
Previous file: linux/drivers/atm/fore200e.c
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Fri Dec 29 14:35:47 2000
- Orig file:
v2.4.0-test12/linux/drivers/atm/horizon.c
- Orig date:
Thu Jul 6 21:37:24 2000
diff -u --recursive --new-file v2.4.0-test12/linux/drivers/atm/horizon.c linux/drivers/atm/horizon.c
@@ -2491,15 +2491,10 @@
return -EINVAL;
}
- // prevent module unload while sleeping (kmalloc)
- // doing this any earlier would complicate more error return paths
- MOD_INC_USE_COUNT;
-
// get space for our vcc stuff and copy parameters into it
vccp = kmalloc (sizeof(hrz_vcc), GFP_KERNEL);
if (!vccp) {
PRINTK (KERN_ERR, "out of memory!");
- MOD_DEC_USE_COUNT;
return -ENOMEM;
}
*vccp = vcc;
@@ -2531,7 +2526,6 @@
if (error) {
PRINTD (DBG_QOS|DBG_VCC, "insufficient cell rate resources");
kfree (vccp);
- MOD_DEC_USE_COUNT;
return error;
}
@@ -2550,7 +2544,6 @@
error = hrz_open_rx (dev, channel);
if (error) {
kfree (vccp);
- MOD_DEC_USE_COUNT;
return error;
}
// this link allows RX frames through
@@ -2620,7 +2613,6 @@
kfree (vcc);
// say the VPI/VCI is free again
clear_bit(ATM_VF_ADDR,&atm_vcc->flags);
- MOD_DEC_USE_COUNT;
}
#if 0
@@ -2751,7 +2743,8 @@
close: hrz_close,
send: hrz_send,
sg_send: hrz_sg_send,
- proc_read: hrz_proc_read
+ proc_read: hrz_proc_read,
+ owner: THIS_MODULE,
};
static int __init hrz_probe (void) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)