diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 14:54:01 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 14:54:01 +0300 |
commit | 0ba6c33bcddc64a54b5f1c25a696c4767dc76292 (patch) | |
tree | 62e616f97a4762d8e75bf732e4827af2d15d52c5 /drivers/net/wan/pc300_tty.c | |
parent | 21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (diff) | |
parent | 85040bcb4643cba578839e953f25e2d1965d83d0 (diff) | |
download | linux-0ba6c33bcddc64a54b5f1c25a696c4767dc76292.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25: (1470 commits)
[IPV6] ADDRLABEL: Fix double free on label deletion.
[PPP]: Sparse warning fixes.
[IPV4] fib_trie: remove unneeded NULL check
[IPV4] fib_trie: More whitespace cleanup.
[NET_SCHED]: Use nla_policy for attribute validation in ematches
[NET_SCHED]: Use nla_policy for attribute validation in actions
[NET_SCHED]: Use nla_policy for attribute validation in classifiers
[NET_SCHED]: Use nla_policy for attribute validation in packet schedulers
[NET_SCHED]: sch_api: introduce constant for rate table size
[NET_SCHED]: Use typeful attribute parsing helpers
[NET_SCHED]: Use typeful attribute construction helpers
[NET_SCHED]: Use NLA_PUT_STRING for string dumping
[NET_SCHED]: Use nla_nest_start/nla_nest_end
[NET_SCHED]: Propagate nla_parse return value
[NET_SCHED]: act_api: use PTR_ERR in tcf_action_init/tcf_action_get
[NET_SCHED]: act_api: use nlmsg_parse
[NET_SCHED]: act_api: fix netlink API conversion bug
[NET_SCHED]: sch_netem: use nla_parse_nested_compat
[NET_SCHED]: sch_atm: fix format string warning
[NETNS]: Add namespace for ICMP replying code.
...
Diffstat (limited to 'drivers/net/wan/pc300_tty.c')
-rw-r--r-- | drivers/net/wan/pc300_tty.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c index e24a7b095dd6..63abfd72542d 100644 --- a/drivers/net/wan/pc300_tty.c +++ b/drivers/net/wan/pc300_tty.c @@ -313,7 +313,7 @@ static int cpc_tty_open(struct tty_struct *tty, struct file *flip) if (cpc_tty->num_open == 0) { /* first open of this tty */ if (!cpc_tty_area[port].buf_tx){ cpc_tty_area[port].buf_tx = kmalloc(CPC_TTY_MAX_MTU,GFP_KERNEL); - if (cpc_tty_area[port].buf_tx == 0){ + if (!cpc_tty_area[port].buf_tx) { CPC_TTY_DBG("%s: error in memory allocation\n",cpc_tty->name); return -ENOMEM; } @@ -678,7 +678,7 @@ static void cpc_tty_rx_work(struct work_struct *work) for (j=0; j < CPC_TTY_NPORTS; j++) { cpc_tty = &cpc_tty_area[port]; - if ((buf=cpc_tty->buf_rx.first) != 0) { + if ((buf=cpc_tty->buf_rx.first) != NULL) { if (cpc_tty->tty) { ld = tty_ldisc_ref(cpc_tty->tty); if (ld) { @@ -784,7 +784,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev) } new = kmalloc(rx_len + sizeof(st_cpc_rx_buf), GFP_ATOMIC); - if (new == 0) { + if (!new) { cpc_tty_rx_disc_frame(pc300chan); continue; } @@ -863,7 +863,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev) } new->size = rx_len; new->next = NULL; - if (cpc_tty->buf_rx.first == 0) { + if (cpc_tty->buf_rx.first == NULL) { cpc_tty->buf_rx.first = new; cpc_tty->buf_rx.last = new; } else { @@ -891,7 +891,7 @@ static void cpc_tty_tx_work(struct work_struct *work) CPC_TTY_DBG("%s: cpc_tty_tx_work init\n",cpc_tty->name); - if ((tty = cpc_tty->tty) == 0) { + if ((tty = cpc_tty->tty) == NULL) { CPC_TTY_DBG("%s: the interface is not opened\n",cpc_tty->name); return; } @@ -1027,7 +1027,7 @@ void cpc_tty_unregister_service(pc300dev_t *pc300dev) ulong flags; int res; - if ((cpc_tty= (st_cpc_tty_area *) pc300dev->cpc_tty) == 0) { + if ((cpc_tty= (st_cpc_tty_area *) pc300dev->cpc_tty) == NULL) { CPC_TTY_DBG("%s: interface is not TTY\n", pc300dev->dev->name); return; } |