diff mbox series

drm/i915: Fix error code in icl_compute_combo_phy_dpll()

Message ID YrVcHArNMTGCSy+9@kili (mailing list archive)
State New, archived
Headers show
Series drm/i915: Fix error code in icl_compute_combo_phy_dpll() | expand

Commit Message

Dan Carpenter June 24, 2022, 6:39 a.m. UTC
This function is supposed to return zero or negative error codes but it
accidentally returns true on failure.

Fixes: 92a020747d6c ("drm/i915: Split shared dpll .get_dplls() into compute and get phases")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Souza, Jose June 24, 2022, 12:55 p.m. UTC | #1
On Fri, 2022-06-24 at 09:39 +0300, Dan Carpenter wrote:
> This function is supposed to return zero or negative error codes but it
> accidentally returns true on failure.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> Fixes: 92a020747d6c ("drm/i915: Split shared dpll .get_dplls() into compute and get phases")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> index ddae7e42ac46..118598c9a809 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> @@ -3184,7 +3184,7 @@ static int icl_compute_combo_phy_dpll(struct intel_atomic_state *state,
>  	struct icl_port_dpll *port_dpll =
>  		&crtc_state->icl_port_dplls[ICL_PORT_DPLL_DEFAULT];
>  	struct skl_wrpll_params pll_params = {};
> -	bool ret;
> +	int ret;
>  
>  	if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI) ||
>  	    intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI))
Ville Syrjala June 28, 2022, 10:29 a.m. UTC | #2
On Fri, Jun 24, 2022 at 12:55:52PM +0000, Souza, Jose wrote:
> On Fri, 2022-06-24 at 09:39 +0300, Dan Carpenter wrote:
> > This function is supposed to return zero or negative error codes but it
> > accidentally returns true on failure.
> 
> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

Thanks for the patch and review. Pushed to drm-intel-next.

> 
> > 
> > Fixes: 92a020747d6c ("drm/i915: Split shared dpll .get_dplls() into compute and get phases")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > index ddae7e42ac46..118598c9a809 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > @@ -3184,7 +3184,7 @@ static int icl_compute_combo_phy_dpll(struct intel_atomic_state *state,
> >  	struct icl_port_dpll *port_dpll =
> >  		&crtc_state->icl_port_dplls[ICL_PORT_DPLL_DEFAULT];
> >  	struct skl_wrpll_params pll_params = {};
> > -	bool ret;
> > +	int ret;
> >  
> >  	if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI) ||
> >  	    intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI))
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
index ddae7e42ac46..118598c9a809 100644
--- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
+++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
@@ -3184,7 +3184,7 @@  static int icl_compute_combo_phy_dpll(struct intel_atomic_state *state,
 	struct icl_port_dpll *port_dpll =
 		&crtc_state->icl_port_dplls[ICL_PORT_DPLL_DEFAULT];
 	struct skl_wrpll_params pll_params = {};
-	bool ret;
+	int ret;
 
 	if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI) ||
 	    intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI))