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]
Date:   Tue, 28 Dec 2021 08:05:18 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Peiwei Hu <jlu.hpw@...mail.com>
Cc:     jdelvare@...e.com, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org, trivial@...nel.org
Subject: Re: [PATCH] hwmon: add free before exiting xgene_hwmon_probe

On Tue, Dec 28, 2021 at 04:59:10PM +0800, Peiwei Hu wrote:
> do kfifo_free(&ctx->async_msg_fifo) before error exiting
> instead of returning directly.
> 

Applied, but please reference the driver in the subject line
of future patches.

Guenter

> Signed-off-by: Peiwei Hu <jlu.hpw@...mail.com>
> ---
>  drivers/hwmon/xgene-hwmon.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
> index 30aae8642069..5cde837bfd09 100644
> --- a/drivers/hwmon/xgene-hwmon.c
> +++ b/drivers/hwmon/xgene-hwmon.c
> @@ -659,8 +659,10 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
>  
>  		acpi_id = acpi_match_device(pdev->dev.driver->acpi_match_table,
>  					    &pdev->dev);
> -		if (!acpi_id)
> -			return -EINVAL;
> +		if (!acpi_id) {
> +			rc = -EINVAL;
> +			goto out_mbox_free;
> +		}
>  
>  		version = (int)acpi_id->driver_data;
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ