drm/mediatek: Test component initialization earlier in the function mtk_drm_crtc_create
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Mon, 12 Jul 2021 18:12:09 +0000 (20:12 +0200)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Mon, 9 Aug 2021 14:16:56 +0000 (22:16 +0800)
commit5b0ef98ed1e227b3e113a095abcaa0a22bb18400
treebe51c378694f900250c2ef2ca5e15966e046aa22
parent58e4c539820020c5c997551b05a4093cae645870
drm/mediatek: Test component initialization earlier in the function mtk_drm_crtc_create

The initialization is currently tested in a later stage in
the function for no reason.
In addition, the test '!comp' will never fail since comp is
set with the '&' operator. Instead, test if a comp was not
initialized by testing "!comp->dev".

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_drm_crtc.c