diff mbox

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

Message ID 1426739616-10635-2-git-send-email-daniels@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Stone March 19, 2015, 4:33 a.m. UTC
mode is always NULL at this point in the function, so make our intention
clear.

Signed-off-by: Daniel Stone <daniels@collabora.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Vetter March 20, 2015, 3:57 p.m. UTC | #1
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@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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

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;
 
 	/* attempt to find a matching mode in the list of modes
 	 *  we have gotten so far, if not add a CVT mode that conforms