Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155500
b: refs/heads/master
c: 9237a81
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Jul 16, 2009
1 parent 3f9321a commit ef6be0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: 5c9228f0cfb09a098a8a380116b42ae099e967b6
refs/heads/master: 9237a81a1468d0aca1cc4e244bba2362d6f81b35
12 changes: 8 additions & 4 deletions trunk/drivers/char/nozomi.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ static int receive_data(enum port_type index, struct nozomi *dc)
struct port *port = &dc->port[index];
void __iomem *addr = port->dl_addr[port->toggle_dl];
struct tty_struct *tty = tty_port_tty_get(&port->port);
int i;
int i, ret;

if (unlikely(!tty)) {
DBG1("tty not open for port: %d?", index);
Expand All @@ -844,12 +844,14 @@ static int receive_data(enum port_type index, struct nozomi *dc)

/* disable interrupt in downlink... */
disable_transmit_dl(index, dc);
return 0;
ret = 0;
goto put;
}

if (unlikely(size == 0)) {
dev_err(&dc->pdev->dev, "size == 0?\n");
return 1;
ret = 1;
goto put;
}

tty_buffer_request_room(tty, size);
Expand All @@ -871,8 +873,10 @@ static int receive_data(enum port_type index, struct nozomi *dc)
}

set_bit(index, &dc->flip);
ret = 1;
put:
tty_kref_put(tty);
return 1;
return ret;
}

/* Debug for interrupts */
Expand Down

0 comments on commit ef6be0a

Please sign in to comment.