From: Dr. David Alan Gilbert Date: Sun, 31 Oct 2010 07:26:03 +0000 (+0000) Subject: l2tp: kzalloc with swapped params in l2tp_dfs_seq_open X-Git-Tag: upstream/snapshot3+hdmi~12461^2~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f9b901823aafd14a84ae27f61ff28bafed01260;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git l2tp: kzalloc with swapped params in l2tp_dfs_seq_open 'sparse' spotted that the parameters to kzalloc in l2tp_dfs_seq_open were swapped. Tested on current git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git at 1792f17b7210280a3d7ff29da9614ba779cfcedb build, boots and I can see that directory, but there again I could see /sys/kernel/debug/l2tp with it swapped; I don't have any l2tp in use. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: David S. Miller --- diff --git a/net/l2tp/l2tp_debugfs.c b/net/l2tp/l2tp_debugfs.c index 104ec3b..b8dbae8 100644 --- a/net/l2tp/l2tp_debugfs.c +++ b/net/l2tp/l2tp_debugfs.c @@ -249,7 +249,7 @@ static int l2tp_dfs_seq_open(struct inode *inode, struct file *file) struct seq_file *seq; int rc = -ENOMEM; - pd = kzalloc(GFP_KERNEL, sizeof(*pd)); + pd = kzalloc(sizeof(*pd), GFP_KERNEL); if (pd == NULL) goto out;