drm/exynos: Fix return type for mixer_mode_valid and hdmi_mode_valid
authorNathan Huckleberry <nhuck@google.com>
Mon, 26 Sep 2022 00:31:00 +0000 (09:31 +0900)
committerInki Dae <inki.dae@samsung.com>
Mon, 26 Sep 2022 01:13:00 +0000 (10:13 +0900)
commit1261255531088208daeca818e2b486030b5339e5
tree2af5610da164bb5475a75265fa709a2c08322a23
parent372a2eaf9bed96395699eb4c2d32e3fe48830e8c
drm/exynos: Fix return type for mixer_mode_valid and hdmi_mode_valid

The field mode_valid in exynos_drm_crtc_ops is expected to be of type enum
drm_mode_status (*mode_valid)(struct exynos_drm_crtc *crtc,
                                   const struct drm_display_mode *mode);

Likewise for mode_valid in drm_connector_helper_funcs.

The mismatched return type breaks forward edge kCFI since the underlying
function definition does not match the function hook definition.

The return type of mixer_mode_valid and hdmi_mode_valid should be changed
from int to enum drm_mode_status.

Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://protect2.fireeye.com/v1/url?k=3e644738-5fef521d-3e65cc77-
74fe485cbff6-36ad29bf912d3c9f&q=1&e=5cc06174-77dd-4abd-ab50-
155da5711aa3&u=https%3A%2F%2Fgithub.com%2FClangBuiltLinux%2Flinux%2Fissues%2F
1703
Cc: llvm@lists.linux.dev
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_hdmi.c
drivers/gpu/drm/exynos/exynos_mixer.c