Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25572
b: refs/heads/master
c: f4675c7
h: refs/heads/master
v: v3
  • Loading branch information
Adrian Bunk authored and Linus Torvalds committed Apr 11, 2006
1 parent 7f91ec6 commit 2adfe90
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ca445df3a3291c2bdd95b91142c079700a688be
refs/heads/master: f4675c7016484220a62069d87958a2873d92f159
13 changes: 8 additions & 5 deletions trunk/drivers/isdn/gigaset/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,8 +1110,9 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors,
drv = kmalloc(sizeof *drv, GFP_KERNEL);
if (!drv)
return NULL;

if (!try_module_get(owner))
return NULL;
goto out1;

drv->cs = NULL;
drv->have_tty = 0;
Expand All @@ -1125,10 +1126,11 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors,

drv->cs = kmalloc(minors * sizeof *drv->cs, GFP_KERNEL);
if (!drv->cs)
goto out1;
goto out2;

drv->flags = kmalloc(minors * sizeof *drv->flags, GFP_KERNEL);
if (!drv->flags)
goto out2;
goto out3;

for (i = 0; i < minors; ++i) {
drv->flags[i] = 0;
Expand All @@ -1145,11 +1147,12 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors,

return drv;

out2:
out3:
kfree(drv->cs);
out2:
module_put(owner);
out1:
kfree(drv);
module_put(owner);
return NULL;
}
EXPORT_SYMBOL_GPL(gigaset_initdriver);
Expand Down

0 comments on commit 2adfe90

Please sign in to comment.