e1000: FIX: Stop raw interrupts disabled nag from RT
[pandora-kernel.git] / net / rxrpc / connection.c
index 573b572..a7c929a 100644 (file)
@@ -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);
@@ -164,7 +163,7 @@ int rxrpc_create_connection(struct rxrpc_transport *trans,
                conn = list_entry(_p, struct rxrpc_connection, link);
                if (conn->addr.sin_port == candidate->addr.sin_port     &&
                    conn->security_ix   == candidate->security_ix       &&
-                   conn->service_id    == candidate->service_id        && 
+                   conn->service_id    == candidate->service_id        &&
                    conn->in_clientflag == 0)
                        goto found_in_graveyard;
        }
@@ -248,13 +247,13 @@ int rxrpc_connection_lookup(struct rxrpc_peer *peer,
                    conn->in_epoch              == x_epoch      &&
                    conn->conn_id               == x_connid     &&
                    conn->security_ix           == x_secix      &&
-                   conn->service_id            == x_servid     && 
+                   conn->service_id            == x_servid     &&
                    conn->in_clientflag         == x_clflag)
                        goto found_active;
        }
        read_unlock(&peer->conn_lock);
 
-       /* [uncommon case] not active 
+       /* [uncommon case] not active
         * - create a candidate for a new record if an inbound connection
         * - only examine the graveyard for an outbound connection
         */
@@ -287,7 +286,7 @@ int rxrpc_connection_lookup(struct rxrpc_peer *peer,
                    conn->in_epoch              == x_epoch      &&
                    conn->conn_id               == x_connid     &&
                    conn->security_ix           == x_secix      &&
-                   conn->service_id            == x_servid     && 
+                   conn->service_id            == x_servid     &&
                    conn->in_clientflag         == x_clflag)
                        goto found_active_second_chance;
        }
@@ -300,7 +299,7 @@ int rxrpc_connection_lookup(struct rxrpc_peer *peer,
                    conn->in_epoch              == x_epoch      &&
                    conn->conn_id               == x_connid     &&
                    conn->security_ix           == x_secix      &&
-                   conn->service_id            == x_servid     && 
+                   conn->service_id            == x_servid     &&
                    conn->in_clientflag         == x_clflag)
                        goto found_in_graveyard;
        }
@@ -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);