Re: [PATCH] staging: sm750fb: Remove redundant zero assignments
From: Greg Kroah-Hartman
Date: Sun Oct 18 2026 - 10:24:44 EST
On Sun, Oct 18, 2026 at 05:15:18PM +0300, Temitope obabi wrote:
> The sm750_dev structure is allocated with devm_kzalloc() before
> sm750fb_setup() is called, so the init_parm fields are already zero.
> Remove the four assignments that set them to zero again.
>
> Signed-off-by: Temitope obabi <obabitemitope765@xxxxxxxxx>
> ---
> drivers/staging/sm750fb/sm750.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 8b93bfeb217b..21744a5a63fb 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -833,10 +833,6 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)
>
> swap = 0;
>
> - sm750_dev->init_parm.chip_clock = 0;
> - sm750_dev->init_parm.mem_clock = 0;
> - sm750_dev->init_parm.master_clock = 0;
> - sm750_dev->init_parm.power_mode = 0;
This is good to keep as it is explict what is happening, right?
thanks,
greg k-h