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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:24 +0000 (14:23 +0200)
commit34d0a99fa09a75a12641dd7b34b05e63d3b58805
tree14ec0b074337b5a90c6de2a32f608b4adc249068
parent2ff993b3daa49902add434a1264370161c7e336a
drm/panfrost: Check for error num after setting mask

[ Upstream commit 44ab30b056149bd59dd7989a593dd25ead6007fd ]

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: f3ba91228e8e ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/panfrost/panfrost_gpu.c