git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
net
/
irda
/
irlap.c
diff --git
a/net/irda/irlap.c
b/net/irda/irlap.c
index
e7852a0
..
7029618
100644
(file)
--- a/
net/irda/irlap.c
+++ b/
net/irda/irlap.c
@@
-29,6
+29,7
@@
*
********************************************************************/
*
********************************************************************/
+#include <linux/config.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/skbuff.h>
@@
-116,10
+117,11
@@
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Initialize the irlap structure. */
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Initialize the irlap structure. */
- self = k
z
alloc(sizeof(struct irlap_cb), GFP_KERNEL);
+ self = k
m
alloc(sizeof(struct irlap_cb), GFP_KERNEL);
if (self == NULL)
return NULL;
if (self == NULL)
return NULL;
+ memset(self, 0, sizeof(struct irlap_cb));
self->magic = LAP_MAGIC;
/* Make a binding between the layers */
self->magic = LAP_MAGIC;
/* Make a binding between the layers */
@@
-881,9
+883,8
@@
static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
/* Change speed now, or just piggyback speed on frames */
if (now) {
/* Send down empty frame to trigger speed change */
/* Change speed now, or just piggyback speed on frames */
if (now) {
/* Send down empty frame to trigger speed change */
- skb = alloc_skb(0, GFP_ATOMIC);
- if (skb)
- irlap_queue_xmit(self, skb);
+ skb = dev_alloc_skb(0);
+ irlap_queue_xmit(self, skb);
}
}
}
}
@@
-1221,7
+1222,7
@@
static int irlap_seq_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int rc = -ENOMEM;
{
struct seq_file *seq;
int rc = -ENOMEM;
- struct irlap_iter_state *s = k
z
alloc(sizeof(*s), GFP_KERNEL);
+ struct irlap_iter_state *s = k
m
alloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
if (!s)
goto out;
@@
-1237,6
+1238,7
@@
static int irlap_seq_open(struct inode *inode, struct file *file)
seq = file->private_data;
seq->private = s;
seq = file->private_data;
seq->private = s;
+ memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree:
out:
return rc;
out_kfree: