diff options
author | Andy Grover <andy.grover@oracle.com> | 2010-01-12 14:56:44 -0500 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 21:11:32 -0400 |
commit | 8690bfa17aea4c42da1bcf90a7af93d161eca624 (patch) | |
tree | 88c4c5fa63aab0c18cf13228c4b3a6f980aa74be /net/rds/tcp.c | |
parent | 2dc393573430f853e56e25bf4b41c34ba2aa8fd6 (diff) |
RDS: cleanup: remove "== NULL"s and "!= NULL"s in ptr comparisons
Favor "if (foo)" style over "if (foo != NULL)".
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/tcp.c')
-rw-r--r-- | net/rds/tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/tcp.c b/net/rds/tcp.c index babf4577ff7d..aebe10314fdb 100644 --- a/net/rds/tcp.c +++ b/net/rds/tcp.c | |||
@@ -200,7 +200,7 @@ static int rds_tcp_conn_alloc(struct rds_connection *conn, gfp_t gfp) | |||
200 | struct rds_tcp_connection *tc; | 200 | struct rds_tcp_connection *tc; |
201 | 201 | ||
202 | tc = kmem_cache_alloc(rds_tcp_conn_slab, gfp); | 202 | tc = kmem_cache_alloc(rds_tcp_conn_slab, gfp); |
203 | if (tc == NULL) | 203 | if (!tc) |
204 | return -ENOMEM; | 204 | return -ENOMEM; |
205 | 205 | ||
206 | tc->t_sock = NULL; | 206 | tc->t_sock = NULL; |
@@ -283,7 +283,7 @@ int __init rds_tcp_init(void) | |||
283 | rds_tcp_conn_slab = kmem_cache_create("rds_tcp_connection", | 283 | rds_tcp_conn_slab = kmem_cache_create("rds_tcp_connection", |
284 | sizeof(struct rds_tcp_connection), | 284 | sizeof(struct rds_tcp_connection), |
285 | 0, 0, NULL); | 285 | 0, 0, NULL); |
286 | if (rds_tcp_conn_slab == NULL) { | 286 | if (!rds_tcp_conn_slab) { |
287 | ret = -ENOMEM; | 287 | ret = -ENOMEM; |
288 | goto out; | 288 | goto out; |
289 | } | 289 | } |