[RFC PATCH 02/37] drm: fb_helper: Simplify exit condition

Daniel Vetter daniel at ffwll.ch
Fri Mar 20 08:57:04 PDT 2015


On Thu, Mar 19, 2015 at 04:33:01AM +0000, Daniel Stone wrote:
> mode is always NULL at this point in the function, so make our intention
> clear.
> 
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
>  drivers/gpu/drm/drm_fb_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 1a20db7..27f5617 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1288,7 +1288,7 @@ struct drm_display_mode *drm_pick_cmdline_mode(struct drm_fb_helper_connector *f
>  
>  	cmdline_mode = &fb_helper_conn->connector->cmdline_mode;
>  	if (cmdline_mode->specified == false)
> -		return mode;
> +		return NULL;

We can stop clearing mode with this change, so I did that on top. And
there was a ugly space 2 lines below. Bikeshedding bikesheds, yay!

Applied to drm-misc, thanks.
-Daniel

>  
>  	/* attempt to find a matching mode in the list of modes
>  	 *  we have gotten so far, if not add a CVT mode that conforms
> -- 
> 2.3.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list