diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-06-22 02:17:30 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-22 04:07:48 +0200 |
commit | 990a8baf568ca1d0ae65e59783ff821794118d07 (patch) | |
tree | 1fe187b2f119f7a9d96d56380b211f9ddb9f8390 /drivers/md/raid10.c | |
parent | [PATCH] md: make sure md/bitmap doesn't try to write a page with active write... (diff) | |
download | linux-990a8baf568ca1d0ae65e59783ff821794118d07.tar.xz linux-990a8baf568ca1d0ae65e59783ff821794118d07.zip |
[PATCH] md: remove unneeded NULL checks before kfree
This patch removes some unneeded checks of pointers being NULL before
calling kfree() on them. kfree() handles NULL pointers just fine, checking
first is pointless.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index fd7324a86d13..62ebb1bc72be 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1737,8 +1737,7 @@ static int run(mddev_t *mddev) out_free_conf: if (conf->r10bio_pool) mempool_destroy(conf->r10bio_pool); - if (conf->mirrors) - kfree(conf->mirrors); + kfree(conf->mirrors); kfree(conf); mddev->private = NULL; out: @@ -1754,8 +1753,7 @@ static int stop(mddev_t *mddev) blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ if (conf->r10bio_pool) mempool_destroy(conf->r10bio_pool); - if (conf->mirrors) - kfree(conf->mirrors); + kfree(conf->mirrors); kfree(conf); mddev->private = NULL; return 0; |