[ALPS05092516] block: refine bio_crypt_alloc_ctx
In bio_crypt_alloc_ctx(), check return value of mempool_alloc() before using it. MTK-Commit-Id: 3bbe5842f2812338b9a1f53c0f647a696e7f0c0b Change-Id: I657d61ad1e8296269e6f91f6229b4c57ac0d189d Signed-off-by: Light Hsieh <light.hsieh@mediatek.com> CR-Id: ALPS05092516 Feature: [Android Default] F2FS File System
This commit is contained in:
@@ -49,7 +49,8 @@ struct bio_crypt_ctx *bio_crypt_alloc_ctx(gfp_t gfp_mask)
|
||||
{
|
||||
struct bio_crypt_ctx *bc = mempool_alloc(bio_crypt_ctx_pool, gfp_mask);
|
||||
|
||||
bc->hie_ext4 = false;
|
||||
if (bc)
|
||||
bc->hie_ext4 = false;
|
||||
|
||||
return bc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user