Re: [Intel-gfx] [patch] drm/i915: return false on failure in intel_dp_compute_config()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 23, 2017 at 01:09:14PM +0200, Joonas Lahtinen wrote:
> On to, 2017-02-23 at 13:39 +0300, Dan Carpenter wrote:
> > This function is a bool type where we are supposed to return false on
> > failure and true on success.  Negative error codes are currently treated
> > as true.
> > 
> > Fixes: a1b2278e4dfc ("drm/i915: skylake panel fitting using shared scalers")
> > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> <SNIP>
> 
> > 
> > @@ -1637,10 +1637,8 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> >  				       adjusted_mode);
> >  
> >  		if (INTEL_GEN(dev_priv) >= 9) {
> > -			int ret;
> > -			ret = skl_update_scaler_crtc(pipe_config);
> > -			if (ret)
> > -				return ret;
> > +			if (skl_update_scaler_crtc(pipe_config))
> > +				return false;
> >  		}
> 
> You can drop the braces, too.
> 

Multi-line indents get braces for readability.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux