aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/irttp.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2005-09-24 19:55:17 -0400
committerDavid S. Miller <davem@davemloft.net>2005-09-24 19:55:17 -0400
commit8689c07e47e928f8e329f667df8cf697a37425dd (patch)
tree588c48af8de8530a0d1f6135cbdd32b3b1920f73 /net/irda/irttp.c
parent15166fadb0308496bbff50c08ed5fe6a18d5cc4f (diff)
[IRDA]: *irttp cleanup
* Remove useless comment. * Remove useless assertions. * Remove useless comparison. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/irttp.c')
-rw-r--r--net/irda/irttp.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 1df6487609e1..8aff254cb418 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -38,7 +38,7 @@
38#include <net/irda/parameters.h> 38#include <net/irda/parameters.h>
39#include <net/irda/irttp.h> 39#include <net/irda/irttp.h>
40 40
41static struct irttp_cb *irttp = NULL; 41static struct irttp_cb *irttp;
42 42
43static void __irttp_close_tsap(struct tsap_cb *self); 43static void __irttp_close_tsap(struct tsap_cb *self);
44 44
@@ -86,12 +86,9 @@ static pi_param_info_t param_info = { pi_major_call_table, 1, 0x0f, 4 };
86 */ 86 */
87int __init irttp_init(void) 87int __init irttp_init(void)
88{ 88{
89 /* Initialize the irttp structure. */ 89 irttp = kmalloc(sizeof(struct irttp_cb), GFP_KERNEL);
90 if (irttp == NULL) { 90 if (irttp == NULL)
91 irttp = kmalloc(sizeof(struct irttp_cb), GFP_KERNEL); 91 return -ENOMEM;
92 if (irttp == NULL)
93 return -ENOMEM;
94 }
95 memset(irttp, 0, sizeof(struct irttp_cb)); 92 memset(irttp, 0, sizeof(struct irttp_cb));
96 93
97 irttp->magic = TTP_MAGIC; 94 irttp->magic = TTP_MAGIC;
@@ -116,7 +113,6 @@ int __init irttp_init(void)
116void __exit irttp_cleanup(void) 113void __exit irttp_cleanup(void)
117{ 114{
118 /* Check for main structure */ 115 /* Check for main structure */
119 IRDA_ASSERT(irttp != NULL, return;);
120 IRDA_ASSERT(irttp->magic == TTP_MAGIC, return;); 116 IRDA_ASSERT(irttp->magic == TTP_MAGIC, return;);
121 117
122 /* 118 /*
@@ -383,7 +379,6 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
383 struct lsap_cb *lsap; 379 struct lsap_cb *lsap;
384 notify_t ttp_notify; 380 notify_t ttp_notify;
385 381
386 IRDA_ASSERT(irttp != NULL, return NULL;);
387 IRDA_ASSERT(irttp->magic == TTP_MAGIC, return NULL;); 382 IRDA_ASSERT(irttp->magic == TTP_MAGIC, return NULL;);
388 383
389 /* The IrLMP spec (IrLMP 1.1 p10) says that we have the right to 384 /* The IrLMP spec (IrLMP 1.1 p10) says that we have the right to
@@ -1881,8 +1876,6 @@ static int irttp_seq_open(struct inode *inode, struct file *file)
1881 struct seq_file *seq; 1876 struct seq_file *seq;
1882 int rc = -ENOMEM; 1877 int rc = -ENOMEM;
1883 struct irttp_iter_state *s; 1878 struct irttp_iter_state *s;
1884
1885 IRDA_ASSERT(irttp != NULL, return -EINVAL;);
1886 1879
1887 s = kmalloc(sizeof(*s), GFP_KERNEL); 1880 s = kmalloc(sizeof(*s), GFP_KERNEL);
1888 if (!s) 1881 if (!s)