diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index f3a1f5e2e492a465d9f3a85d6e981ba3c594489d..01a54ee274bb6e89fb1116147d19a0c7d8577b19 100644 --- a/drivers/staging/imx-drm/imx-hdmi.c +++ b/drivers/staging/imx-drm/imx-hdmi.c @@ -463,22 +463,27 @@ static void hdmi_video_sample(struct imx_hdmi *hdmi) static int is_color_space_conversion(struct imx_hdmi *hdmi) { - return (hdmi->hdmi_data.enc_in_format != - hdmi->hdmi_data.enc_out_format); + return hdmi->hdmi_data.enc_in_format != hdmi->hdmi_data.enc_out_format; } static int is_color_space_decimation(struct imx_hdmi *hdmi) { - return ((hdmi->hdmi_data.enc_out_format == YCBCR422_8BITS) && - (hdmi->hdmi_data.enc_in_format == RGB || - hdmi->hdmi_data.enc_in_format == YCBCR444)); + if (hdmi->hdmi_data.enc_out_format != YCBCR422_8BITS) + return 0; + if (hdmi->hdmi_data.enc_in_format == RGB || + hdmi->hdmi_data.enc_in_format == YCBCR444) + return 1; + return 0; } static int is_color_space_interpolation(struct imx_hdmi *hdmi) { - return ((hdmi->hdmi_data.enc_in_format == YCBCR422_8BITS) && - (hdmi->hdmi_data.enc_out_format == RGB || - hdmi->hdmi_data.enc_out_format == YCBCR444)); + if (hdmi->hdmi_data.enc_in_format != YCBCR422_8BITS) + return 0; + if (hdmi->hdmi_data.enc_out_format == RGB || + hdmi->hdmi_data.enc_out_format == YCBCR444) + return 1; + return 0; } static void imx_hdmi_update_csc_coeffs(struct imx_hdmi *hdmi)