diff options
author | Xiaoke Wang <[email protected]> | 2022-04-07 10:31:51 +0800 |
---|---|---|
committer | Rob Clark <[email protected]> | 2022-04-11 09:36:13 -0700 |
commit | 047ae665577776b7feb11bd4f81f46627cff95e7 (patch) | |
tree | b3f474987aec680ccc8aded98dc92c5ea9ab8564 /lib/mpi/mpi-cmp.c | |
parent | 537fef808be5ea56f6fc06932162550819a3b3c3 (diff) |
drm/msm/mdp5: check 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, since mdp5_plane_reset() is void type, so we should better
set `plane-state` to NULL after releasing it.
Signed-off-by: Xiaoke Wang <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/481055/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions