Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43704
b: refs/heads/master
c: 4a7cb69
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Dec 8, 2006
1 parent 2a69a26 commit 60c5a54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 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: 5572e10323a7d3cdccf639225553a6e2542049bd
refs/heads/master: 4a7cb69badb4ca11fe0ba09aafac5c284922fc8f
14 changes: 1 addition & 13 deletions trunk/drivers/char/sx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2267,18 +2267,6 @@ static int sx_init_drivers(void)
return 0;
}


static void * ckmalloc (int size)
{
void *p;

p = kmalloc(size, GFP_KERNEL);
if (p)
memset(p, 0, size);
return p;
}


static int sx_init_portstructs (int nboards, int nports)
{
struct sx_board *board;
Expand All @@ -2291,7 +2279,7 @@ static int sx_init_portstructs (int nboards, int nports)

/* Many drivers statically allocate the maximum number of ports
There is no reason not to allocate them dynamically. Is there? -- REW */
sx_ports = ckmalloc(nports * sizeof (struct sx_port));
sx_ports = kcalloc(nports, sizeof(struct sx_port), GFP_KERNEL);
if (!sx_ports)
return -ENOMEM;

Expand Down

0 comments on commit 60c5a54

Please sign in to comment.