diff options
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index e7d934eca06f..e11dd14d0b43 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -371,10 +371,8 @@ static int raid0_run (mddev_t *mddev) | |||
371 | return 0; | 371 | return 0; |
372 | 372 | ||
373 | out_free_conf: | 373 | out_free_conf: |
374 | if (conf->strip_zone) | 374 | kfree(conf->strip_zone); |
375 | kfree(conf->strip_zone); | 375 | kfree(conf->devlist); |
376 | if (conf->devlist) | ||
377 | kfree (conf->devlist); | ||
378 | kfree(conf); | 376 | kfree(conf); |
379 | mddev->private = NULL; | 377 | mddev->private = NULL; |
380 | out: | 378 | out: |
@@ -386,11 +384,11 @@ static int raid0_stop (mddev_t *mddev) | |||
386 | raid0_conf_t *conf = mddev_to_conf(mddev); | 384 | raid0_conf_t *conf = mddev_to_conf(mddev); |
387 | 385 | ||
388 | blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ | 386 | blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ |
389 | kfree (conf->hash_table); | 387 | kfree(conf->hash_table); |
390 | conf->hash_table = NULL; | 388 | conf->hash_table = NULL; |
391 | kfree (conf->strip_zone); | 389 | kfree(conf->strip_zone); |
392 | conf->strip_zone = NULL; | 390 | conf->strip_zone = NULL; |
393 | kfree (conf); | 391 | kfree(conf); |
394 | mddev->private = NULL; | 392 | mddev->private = NULL; |
395 | 393 | ||
396 | return 0; | 394 | return 0; |