drm/sprd: check the platform_get_resource() return value
authorKevin Tang <kevin3.tang@gmail.com>
Fri, 24 Dec 2021 13:37:00 +0000 (21:37 +0800)
committerkevin3.tang <kevin3.tang@gmail.com>
Mon, 14 Feb 2022 13:53:17 +0000 (21:53 +0800)
commit73792e6e66be1225837cc1a40f1e39b1d077751c
tree08b40421b5e97c23012961f25fa3d9136f9de131
parent8668658aebb0a19d877d5a81c004baf716c4aaa6
drm/sprd: check the platform_get_resource() return value

platform_get_resource() may fail and return NULL, so check it's value
before using it.

Reported-by: Zou Wei <zou_wei@huawei.com>
Signed-off-by: Kevin Tang <kevin3.tang@gmail.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/all/20220117084156.9338-1-kevin3.tang@gmail.com
v1 -> v2:
- new patch
drivers/gpu/drm/sprd/sprd_dpu.c
drivers/gpu/drm/sprd/sprd_dsi.c