[Intel-gfx] [PATCH v4 11/11] drm/rockchip: Remove unnecessary NULL check

Daniel Vetter daniel at ffwll.ch
Wed Jun 21 13:39:01 UTC 2017


On Wed, Mar 29, 2017 at 04:44:01PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding at nvidia.com>
> 
> The expression &private->fbdev_helper can never be NULL, so the check is
> completely unnecessary.
> 
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Thierry Reding <treding at nvidia.com>

I just noticed that these two patches at the end of this series don't
depend upon the core rework, so applied them both.
-Daniel

> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
> index 81f9548672b0..df6bceabeca8 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
> @@ -168,10 +168,8 @@ rockchip_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
>  static void rockchip_drm_output_poll_changed(struct drm_device *dev)
>  {
>  	struct rockchip_drm_private *private = dev->dev_private;
> -	struct drm_fb_helper *fb_helper = &private->fbdev_helper;
>  
> -	if (fb_helper)
> -		drm_fb_helper_hotplug_event(fb_helper);
> +	drm_fb_helper_hotplug_event(&private->fbdev_helper);
>  }
>  
>  static void
> -- 
> 2.12.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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


More information about the dri-devel mailing list