Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9297
b: refs/heads/master
c: 8689c07
h: refs/heads/master
i:
  9295: e4a486b
v: v3
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Sep 24, 2005
1 parent 210c04e commit 568b643
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 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: 15166fadb0308496bbff50c08ed5fe6a18d5cc4f
refs/heads/master: 8689c07e47e928f8e329f667df8cf697a37425dd
15 changes: 4 additions & 11 deletions trunk/net/irda/irttp.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <net/irda/parameters.h>
#include <net/irda/irttp.h>

static struct irttp_cb *irttp = NULL;
static struct irttp_cb *irttp;

static void __irttp_close_tsap(struct tsap_cb *self);

Expand Down Expand Up @@ -86,12 +86,9 @@ static pi_param_info_t param_info = { pi_major_call_table, 1, 0x0f, 4 };
*/
int __init irttp_init(void)
{
/* Initialize the irttp structure. */
if (irttp == NULL) {
irttp = kmalloc(sizeof(struct irttp_cb), GFP_KERNEL);
if (irttp == NULL)
return -ENOMEM;
}
irttp = kmalloc(sizeof(struct irttp_cb), GFP_KERNEL);
if (irttp == NULL)
return -ENOMEM;
memset(irttp, 0, sizeof(struct irttp_cb));

irttp->magic = TTP_MAGIC;
Expand All @@ -116,7 +113,6 @@ int __init irttp_init(void)
void __exit irttp_cleanup(void)
{
/* Check for main structure */
IRDA_ASSERT(irttp != NULL, return;);
IRDA_ASSERT(irttp->magic == TTP_MAGIC, return;);

/*
Expand Down Expand Up @@ -383,7 +379,6 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
struct lsap_cb *lsap;
notify_t ttp_notify;

IRDA_ASSERT(irttp != NULL, return NULL;);
IRDA_ASSERT(irttp->magic == TTP_MAGIC, return NULL;);

/* The IrLMP spec (IrLMP 1.1 p10) says that we have the right to
Expand Down Expand Up @@ -1881,8 +1876,6 @@ static int irttp_seq_open(struct inode *inode, struct file *file)
struct seq_file *seq;
int rc = -ENOMEM;
struct irttp_iter_state *s;

IRDA_ASSERT(irttp != NULL, return -EINVAL;);

s = kmalloc(sizeof(*s), GFP_KERNEL);
if (!s)
Expand Down

0 comments on commit 568b643

Please sign in to comment.