lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241011074702.GN661995@google.com>
Date: Fri, 11 Oct 2024 08:47:02 +0100
From: Lee Jones <lee@...nel.org>
To: SurajSonawane2415 <surajsonawane0215@...il.com>
Cc: pavel@....cz, matthias.bgg@...il.com,
	angelogioacchino.delregno@...labora.com, linux-leds@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] leds: Fix uninitialized variable 'ret' in
 mt6370_mc_pattern_clear

On Sun, 06 Oct 2024, SurajSonawane2415 wrote:

> Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear
> to resolve the following warning:
> drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
> error: uninitialized symbol 'ret'.
> Initialize 'ret' to 0 to prevent undefined behavior from uninitialized
> access.
> 
> Signed-off-by: SurajSonawane2415 <surajsonawane0215@...il.com>

Real names only.  Please update your .gitconfig.

> ---
>  drivers/leds/rgb/leds-mt6370-rgb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/rgb/leds-mt6370-rgb.c b/drivers/leds/rgb/leds-mt6370-rgb.c
> index 10a0b5b45..87805c21e 100644
> --- a/drivers/leds/rgb/leds-mt6370-rgb.c
> +++ b/drivers/leds/rgb/leds-mt6370-rgb.c
> @@ -587,7 +587,7 @@ static inline int mt6370_mc_pattern_clear(struct led_classdev *lcdev)
>  	struct mt6370_led *led = container_of(mccdev, struct mt6370_led, mc);
>  	struct mt6370_priv *priv = led->priv;
>  	struct mc_subled *subled;
> -	int i, ret;
> +	int i, ret = 0;
>  
>  	mutex_lock(&led->priv->lock);
>  
> -- 
> 2.34.1
> 

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ