Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24203
b: refs/heads/master
c: 56ee482
h: refs/heads/master
i:
  24201: 8f2ab93
  24199: dbfc070
v: v3
  • Loading branch information
Eric Sesterhenn authored and Adrian Bunk committed Mar 26, 2006
1 parent b3bfc3c commit ab9f122
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 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: 373ebfbf17a8ecad304f65cb92c4d2d10adc0a19
refs/heads/master: 56ee48277fa214b3b7b0fd91e7fd3464e12597de
3 changes: 1 addition & 2 deletions trunk/drivers/char/epca.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,7 @@ static void pc_close(struct tty_struct * tty, struct file * filp)
} /* End channel is open more than once */

/* Port open only once go ahead with shutdown & reset */
if (ch->count < 0)
BUG();
BUG_ON(ch->count < 0);

/* ---------------------------------------------------------------
Let the rest of the driver know the channel is being closed.
Expand Down
11 changes: 4 additions & 7 deletions trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,14 +543,12 @@ void tty_ldisc_put(int disc)
struct tty_ldisc *ld;
unsigned long flags;

if (disc < N_TTY || disc >= NR_LDISCS)
BUG();
BUG_ON(disc < N_TTY || disc >= NR_LDISCS);

spin_lock_irqsave(&tty_ldisc_lock, flags);
ld = &tty_ldiscs[disc];
if(ld->refcount == 0)
BUG();
ld->refcount --;
BUG_ON(ld->refcount == 0);
ld->refcount--;
module_put(ld->owner);
spin_unlock_irqrestore(&tty_ldisc_lock, flags);
}
Expand Down Expand Up @@ -645,8 +643,7 @@ void tty_ldisc_deref(struct tty_ldisc *ld)
{
unsigned long flags;

if(ld == NULL)
BUG();
BUG_ON(ld == NULL);

spin_lock_irqsave(&tty_ldisc_lock, flags);
if(ld->refcount == 0)
Expand Down

0 comments on commit ab9f122

Please sign in to comment.