mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-26 02:25:00 -05:00
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>
This commit is contained in:
parent
180040b89e
commit
d67b1b0325
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ xfs_Gqm_init(void)
|
|||
goto out;
|
||||
|
||||
gdqhash = kmem_zalloc_large(hsize);
|
||||
if (!udqhash)
|
||||
if (!gdqhash)
|
||||
goto out_free_udqhash;
|
||||
|
||||
hsize /= sizeof(xfs_dqhash_t);
|
||||
|
|
Loading…
Add table
Reference in a new issue