Skip to content
Commit bb5bdc5a authored by Xiaoke Wang's avatar Xiaoke Wang Committed by Joerg Roedel
Browse files

iommu/msm: Add a check for the return of kzalloc()



kzalloc() is a memory allocation function which can return NULL when
some internal memory errors happen. So it is better to check it to
prevent potential wrong memory access.

Besides, to propagate the error to the caller, the type of
insert_iommu_master() is changed to `int`. Several instructions related
to it are also updated.

Signed-off-by: default avatarXiaoke Wang <xkernel.wang@foxmail.com>
Link: https://lore.kernel.org/r/tencent_EDB94B1C7E14B4E1974A66FF4D2029CC6D08@qq.com
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent af2d861d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment