diff options
Diffstat (limited to 'fs/afs/server.c')
-rw-r--r-- | fs/afs/server.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/afs/server.c b/fs/afs/server.c index 22afaae1a4ce..44aff81dc6a7 100644 --- a/fs/afs/server.c +++ b/fs/afs/server.c | |||
@@ -55,13 +55,12 @@ int afs_server_lookup(struct afs_cell *cell, const struct in_addr *addr, | |||
55 | _enter("%p,%08x,", cell, ntohl(addr->s_addr)); | 55 | _enter("%p,%08x,", cell, ntohl(addr->s_addr)); |
56 | 56 | ||
57 | /* allocate and initialise a server record */ | 57 | /* allocate and initialise a server record */ |
58 | server = kmalloc(sizeof(struct afs_server), GFP_KERNEL); | 58 | server = kzalloc(sizeof(struct afs_server), GFP_KERNEL); |
59 | if (!server) { | 59 | if (!server) { |
60 | _leave(" = -ENOMEM"); | 60 | _leave(" = -ENOMEM"); |
61 | return -ENOMEM; | 61 | return -ENOMEM; |
62 | } | 62 | } |
63 | 63 | ||
64 | memset(server, 0, sizeof(struct afs_server)); | ||
65 | atomic_set(&server->usage, 1); | 64 | atomic_set(&server->usage, 1); |
66 | 65 | ||
67 | INIT_LIST_HEAD(&server->link); | 66 | INIT_LIST_HEAD(&server->link); |