]> git.baikalelectronics.ru Git - kernel.git/commit
drm/panfrost: Check for error num after setting mask
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Thu, 6 Jan 2022 03:03:26 +0000 (11:03 +0800)
committerSteven Price <steven.price@arm.com>
Wed, 12 Jan 2022 15:49:55 +0000 (15:49 +0000)
commitffd8640f79381d8881819eb602516ff3089c1c9e
treefc292b8b97c6bb71707e1415a37eea863b767275
parentf646e657bed6b7897efcce225a0bacb9241f92c3
drm/panfrost: Check for error num after setting mask

Because of the possible failure of the dma_supported(), the
dma_set_mask_and_coherent() may return error num.
Therefore, it should be better to check it and return the error if
fails.

Fixes: 0bd01550c49d ("drm/panfrost: Add initial panfrost driver")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
[Steve: fix Fixes: line]
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220106030326.2620942-1-jiasheng@iscas.ac.cn
drivers/gpu/drm/panfrost/panfrost_gpu.c