summaryrefslogtreecommitdiff
path: root/net/rxrpc/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rxrpc/connection.c')
-rw-r--r--net/rxrpc/connection.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/rxrpc/connection.c b/net/rxrpc/connection.c
index 573b572f8f91..93d2c55ad2d5 100644
--- a/net/rxrpc/connection.c
+++ b/net/rxrpc/connection.c
@@ -58,13 +58,12 @@ static inline int __rxrpc_create_connection(struct rxrpc_peer *peer,
_enter("%p",peer);
/* allocate and initialise a connection record */
- conn = kmalloc(sizeof(struct rxrpc_connection), GFP_KERNEL);
+ conn = kzalloc(sizeof(struct rxrpc_connection), GFP_KERNEL);
if (!conn) {
_leave(" = -ENOMEM");
return -ENOMEM;
}
- memset(conn, 0, sizeof(struct rxrpc_connection));
atomic_set(&conn->usage, 1);
INIT_LIST_HEAD(&conn->link);
@@ -535,13 +534,12 @@ int rxrpc_conn_newmsg(struct rxrpc_connection *conn,
return -EINVAL;
}
- msg = kmalloc(sizeof(struct rxrpc_message), alloc_flags);
+ msg = kzalloc(sizeof(struct rxrpc_message), alloc_flags);
if (!msg) {
_leave(" = -ENOMEM");
return -ENOMEM;
}
- memset(msg, 0, sizeof(*msg));
atomic_set(&msg->usage, 1);
INIT_LIST_HEAD(&msg->link);