Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125050
b: refs/heads/master
c: d0c9873
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jan 2, 2009
1 parent 4e51191 commit 66c21a6
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 31f35939d1d9bcfb3099b32c67b896d2792603f9
refs/heads/master: d0c9873addc1f18e7becb50094dad07df8cc4694
17 changes: 4 additions & 13 deletions trunk/drivers/char/rio/rio_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,15 +796,6 @@ static int rio_init_drivers(void)
return 1;
}


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

p = kzalloc(size, GFP_KERNEL);
return p;
}

static const struct tty_port_operations rio_port_ops = {
.carrier_raised = rio_carrier_raised,
};
Expand All @@ -827,18 +818,18 @@ static int rio_init_datastructures(void)
#define TMIO_SZ sizeof(struct termios *)
rio_dprintk(RIO_DEBUG_INIT, "getting : %Zd %Zd %Zd %Zd %Zd bytes\n", RI_SZ, RIO_HOSTS * HOST_SZ, RIO_PORTS * PORT_SZ, RIO_PORTS * TMIO_SZ, RIO_PORTS * TMIO_SZ);

if (!(p = ckmalloc(RI_SZ)))
if (!(p = kzalloc(RI_SZ, GFP_KERNEL)))
goto free0;
if (!(p->RIOHosts = ckmalloc(RIO_HOSTS * HOST_SZ)))
if (!(p->RIOHosts = kzalloc(RIO_HOSTS * HOST_SZ, GFP_KERNEL)))
goto free1;
if (!(p->RIOPortp = ckmalloc(RIO_PORTS * PORT_SZ)))
if (!(p->RIOPortp = kzalloc(RIO_PORTS * PORT_SZ, GFP_KERNEL)))
goto free2;
p->RIOConf = RIOConf;
rio_dprintk(RIO_DEBUG_INIT, "Got : %p %p %p\n", p, p->RIOHosts, p->RIOPortp);

#if 1
for (i = 0; i < RIO_PORTS; i++) {
port = p->RIOPortp[i] = ckmalloc(sizeof(struct Port));
port = p->RIOPortp[i] = kzalloc(sizeof(struct Port), GFP_KERNEL);
if (!port) {
goto free6;
}
Expand Down

0 comments on commit 66c21a6

Please sign in to comment.