X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Firda%2Fdiscovery.c;h=89fd2a2cbca66a170c471672cfcbcd8c56745fd6;hb=refs%2Fheads%2Fvserver;hp=d16ef81552cf1ea1f2340ae099824a561d39a7c7;hpb=6a77f38946aaee1cd85eeec6cf4229b204c15071;p=linux-2.6.git diff --git a/net/irda/discovery.c b/net/irda/discovery.c index d16ef8155..89fd2a2cb 100644 --- a/net/irda/discovery.c +++ b/net/irda/discovery.c @@ -32,6 +32,7 @@ #include #include +#include #include #include @@ -155,7 +156,7 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force) int n; /* Size of the full log */ int i = 0; /* How many we expired */ - ASSERT(log != NULL, return;); + IRDA_ASSERT(log != NULL, return;); IRDA_DEBUG(4, "%s()\n", __FUNCTION__); spin_lock_irqsave(&log->hb_spinlock, flags); @@ -194,8 +195,7 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force) /* Remove it from the log */ curr = hashbin_remove_this(log, (irda_queue_t *) curr); - if (curr) - kfree(curr); + kfree(curr); } } @@ -226,7 +226,7 @@ void irlmp_dump_discoveries(hashbin_t *log) { discovery_t *discovery; - ASSERT(log != NULL, return;); + IRDA_ASSERT(log != NULL, return;); discovery = (discovery_t *) hashbin_get_first(log); while (discovery != NULL) { @@ -270,8 +270,8 @@ struct irda_device_info *irlmp_copy_discoveries(hashbin_t *log, int *pn, int n; /* Size of the full log */ int i = 0; /* How many we picked */ - ASSERT(pn != NULL, return NULL;); - ASSERT(log != NULL, return NULL;); + IRDA_ASSERT(pn != NULL, return NULL;); + IRDA_ASSERT(log != NULL, return NULL;); /* Save spin lock */ spin_lock_irqsave(&log->hb_spinlock, flags); @@ -404,7 +404,7 @@ static struct seq_operations discovery_seq_ops = { static int discovery_seq_open(struct inode *inode, struct file *file) { - ASSERT(irlmp != NULL, return -EINVAL;); + IRDA_ASSERT(irlmp != NULL, return -EINVAL;); return seq_open(file, &discovery_seq_ops); }