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: <c0992fb1-20cd-4aab-847a-66542e9af7d2@kernel.org>
Date: Fri, 29 Nov 2024 12:04:04 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: cleverline1mc@...il.com, Rob Herring <robh@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>,
 Stefan Wahren <stefan.wahren@...rgebyte.com>,
 Stefan Wahren <wahrenst@....net>
Cc: Ben Gardner <bgardner@...tec.com>, linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org
Subject: Re: [PATCH v5 2/4] w1: ds2482: switch to devm_kzalloc() from
 kzalloc()

On 29/11/2024 10:53, Kryštof Černý via B4 Relay wrote:
>  	/* Detect the 8-port version */
> @@ -505,21 +503,15 @@ static int ds2482_probe(struct i2c_client *client)
>  		err = w1_add_master_device(&data->w1_ch[idx].w1_bm);
>  		if (err) {
>  			data->w1_ch[idx].pdev = NULL;
> -			goto exit_w1_remove;
> +			for (idx = 0; idx < data->w1_count; idx++) {
> +				if (data->w1_ch[idx].pdev != NULL)
> +					w1_remove_master_device(&data->w1_ch[idx].w1_bm);
> +			}
> +			return err;
>  		}
>  	}
>  
>  	return 0;
> -
> -exit_w1_remove:
> -	for (idx = 0; idx < data->w1_count; idx++) {
> -		if (data->w1_ch[idx].pdev != NULL)
> -			w1_remove_master_device(&data->w1_ch[idx].w1_bm);

This exit path should stay.

> -	}
> -exit_free:
> -	kfree(data);
> -exit:
> -	return err;
>  }
>  
Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ