aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-02-06 03:45:15 -0500
committerAlex Elder <aelder@sgi.com>2010-02-13 14:22:53 -0500
commitd67b1b03254c501fef371b0e5916c94a52bfc2c5 (patch)
tree87d3505cb841844055c113fd9eea124ed31e2ba0 /fs
parent180040b89ee2aed88c0a0b1fcf7ada9a512b12e3 (diff)
fs/xfs: Correct NULL test
Test the value that was just allocated rather than the previously tested one. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ expression *x; expression e; identifier l; @@ if (x == NULL || ...) { ... when forall return ...; } ... when != goto l; when != x = e when != &x *x == NULL // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/quota/xfs_qm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 8699e51cb45e..417e61e3d9dd 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -123,7 +123,7 @@ xfs_Gqm_init(void)
123 goto out; 123 goto out;
124 124
125 gdqhash = kmem_zalloc_large(hsize); 125 gdqhash = kmem_zalloc_large(hsize);
126 if (!udqhash) 126 if (!gdqhash)
127 goto out_free_udqhash; 127 goto out_free_udqhash;
128 128
129 hsize /= sizeof(xfs_dqhash_t); 129 hsize /= sizeof(xfs_dqhash_t);