[PATCH v7 01/30] drm/fb-helper: Remove unused local variable in hotplug_event()

Thomas Zimmermann tzimmermann at suse.de
Fri Jun 12 06:46:21 PDT 2026



Am 02.06.26 um 00:44 schrieb Cristian Ciocaltea:
> Remove the 'err' local variable in drm_fb_helper_hotplug_event() which
> only stores a return value that is never used beyond the immediate
> return statement.  This simplifies the code without behavior changes.
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea at collabora.com>

Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>

But why is this patch hidden in this series? It has nothing to do with 
HDMI support.

> ---
>   drivers/gpu/drm/drm_fb_helper.c | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 7b11a582f8ec..3316bb00a662 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1744,21 +1744,17 @@ EXPORT_SYMBOL(drm_fb_helper_initial_config);
>    */
>   int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
>   {
> -	int err = 0;
> -
>   	if (!drm_fbdev_emulation || !fb_helper)
>   		return 0;
>   
>   	mutex_lock(&fb_helper->lock);
> -	if (fb_helper->deferred_setup) {
> -		err = __drm_fb_helper_initial_config_and_unlock(fb_helper);
> -		return err;
> -	}
> +	if (fb_helper->deferred_setup)
> +		return __drm_fb_helper_initial_config_and_unlock(fb_helper);
>   
>   	if (!fb_helper->fb || !drm_master_internal_acquire(fb_helper->dev)) {
>   		fb_helper->delayed_hotplug = true;
>   		mutex_unlock(&fb_helper->lock);
> -		return err;
> +		return 0;
>   	}
>   
>   	drm_master_internal_release(fb_helper->dev);
> @@ -1802,4 +1798,3 @@ bool drm_fb_helper_gem_is_fb(const struct drm_fb_helper *fb_helper,
>   	return gem == obj;
>   }
>   EXPORT_SYMBOL_GPL(drm_fb_helper_gem_is_fb);
> -
>

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)





More information about the linux-arm-kernel mailing list