summaryrefslogtreecommitdiffstats
path: root/drivers/atm/atmtcp.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
commit6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch)
tree0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /drivers/atm/atmtcp.c
parentecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff)
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine status unknown.
Diffstat (limited to 'drivers/atm/atmtcp.c')
-rw-r--r--drivers/atm/atmtcp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
index 64c25420e..5e96bf9c9 100644
--- a/drivers/atm/atmtcp.c
+++ b/drivers/atm/atmtcp.c
@@ -330,14 +330,20 @@ static int atmtcp_create(int itf,int persist,struct atm_dev **result)
struct atmtcp_dev_data *dev_data;
struct atm_dev *dev;
+ MOD_INC_USE_COUNT;
+
dev_data = kmalloc(sizeof(*dev_data),GFP_KERNEL);
- if (!dev_data) return -ENOMEM;
+ if (!dev_data) {
+ MOD_DEC_USE_COUNT;
+ return -ENOMEM;
+ }
+
dev = atm_dev_register(DEV_LABEL,&atmtcp_v_dev_ops,itf,NULL);
if (!dev) {
kfree(dev_data);
+ MOD_DEC_USE_COUNT;
return itf == -1 ? -ENOMEM : -EBUSY;
}
- MOD_INC_USE_COUNT;
dev->ci_range.vpi_bits = MAX_VPI_BITS;
dev->ci_range.vci_bits = MAX_VCI_BITS;
PRIV(dev) = dev_data;