Skip to content

Commit fc007fb

Browse files
nhukcpH5
authored andcommitted
drm/imx: imx-tve: Fix return type of imx_tve_connector_mode_valid
The mode_valid field in drm_connector_helper_funcs is expected to be of type: enum drm_mode_status (* mode_valid) (struct drm_connector *connector, struct drm_display_mode *mode); The mismatched return type breaks forward edge kCFI since the underlying function definition does not match the function hook definition. The return type of imx_tve_connector_mode_valid should be changed from int to enum drm_mode_status. Reported-by: Dan Carpenter <[email protected]> Link: ClangBuiltLinux#1703 Cc: [email protected] Signed-off-by: Nathan Huckleberry <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Signed-off-by: Philipp Zabel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent ff52fe0 commit fc007fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/imx/imx-tve.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ static int imx_tve_connector_get_modes(struct drm_connector *connector)
218218
return ret;
219219
}
220220

221-
static int imx_tve_connector_mode_valid(struct drm_connector *connector,
222-
struct drm_display_mode *mode)
221+
static enum drm_mode_status
222+
imx_tve_connector_mode_valid(struct drm_connector *connector,
223+
struct drm_display_mode *mode)
223224
{
224225
struct imx_tve *tve = con_to_tve(connector);
225226
unsigned long rate;

0 commit comments

Comments
 (0)