mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
md: remvoe redundant condition check
mempool_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling mempool_destroy(). Signed-off-by: Chengguang Xu <[email protected]> Signed-off-by: Shaohua Li <[email protected]>
This commit is contained in:
parent
be85f93ae2
commit
37b22c2894
1 changed files with 4 additions and 8 deletions
|
|
@ -5692,14 +5692,10 @@ int md_run(struct mddev *mddev)
|
|||
return 0;
|
||||
|
||||
abort:
|
||||
if (mddev->flush_bio_pool) {
|
||||
mempool_destroy(mddev->flush_bio_pool);
|
||||
mddev->flush_bio_pool = NULL;
|
||||
}
|
||||
if (mddev->flush_pool){
|
||||
mempool_destroy(mddev->flush_pool);
|
||||
mddev->flush_pool = NULL;
|
||||
}
|
||||
mempool_destroy(mddev->flush_bio_pool);
|
||||
mddev->flush_bio_pool = NULL;
|
||||
mempool_destroy(mddev->flush_pool);
|
||||
mddev->flush_pool = NULL;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue