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] [day] [month] [year] [list]
Message-ID: <20160415152959.GC16654@f23x64.localdomain>
Date:	Fri, 15 Apr 2016 08:29:59 -0700
From:	Darren Hart <dvhart@...radead.org>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Eric Piel <eric.piel@...mplin-utc.net>,
	platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch] hp_accel: Silence an uninitialized variable warning

On Fri, Apr 15, 2016 at 05:47:20PM +0300, Dan Carpenter wrote:
> If acpi_evaluate_integer() fails then "lret" isn't initialized.  I've
> tweaked the error handling to avoid this issue.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

Thanks Dan, I verified and queued all 3 patches to fixes for 4.6.

> 
> diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c
> index 10ce6cb..746918e 100644
> --- a/drivers/platform/x86/hp_accel.c
> +++ b/drivers/platform/x86/hp_accel.c
> @@ -127,8 +127,10 @@ static int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
>  	arg0.integer.value = reg;
>  
>  	status = acpi_evaluate_integer(dev->handle, "ALRD", &args, &lret);
> +	if (ACPI_FAILURE(status))
> +		return -EINVAL;
>  	*ret = lret;
> -	return (status != AE_OK) ? -EINVAL : 0;
> +	return 0;
>  }
>  
>  /**
> 

-- 
Darren Hart
Intel Open Source Technology Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ