Skip to content

Commit

Permalink
[DECNET]: kmalloc + memset conversion to kzalloc
Browse files Browse the repository at this point in the history
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mariusz Kozlowski authored and David S. Miller committed Jul 31, 2007
1 parent 313674a commit f879665
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/decnet/dn_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1737,16 +1737,16 @@ static int dn_rt_cache_seq_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int rc = -ENOMEM;
struct dn_rt_cache_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
struct dn_rt_cache_iter_state *s;

s = kzalloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
rc = seq_open(file, &dn_rt_cache_seq_ops);
if (rc)
goto out_kfree;
seq = file->private_data;
seq->private = s;
memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree:
Expand Down

0 comments on commit f879665

Please sign in to comment.