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: <685e5225-339c-4d7e-973c-9f0ab421b15e@wanadoo.fr>
Date: Sun, 4 Aug 2024 09:13:25 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: zhenghaowei@...ngson.cn
Cc: chenhuacai@...nel.org, conor+dt@...nel.org, devicetree@...r.kernel.org,
 gregkh@...uxfoundation.org, jirislaby@...nel.org, kernel@...0n.name,
 krzk+dt@...nel.org, linux-kernel@...r.kernel.org,
 linux-serial@...r.kernel.org, loongarch@...ts.linux.dev,
 p.zabel@...gutronix.de, robh@...nel.org
Subject: Re: [PATCH v2 2/3] tty: serial: 8250: Add loongson uart driver
 support

Le 04/08/2024 à 08:38, 
zhenghaowei-cXZgJK919ebM1kAEIRd3EQ@...lic.gmane.org a écrit :
> From: Haowei Zheng <zhenghaowei-cXZgJK919ebM1kAEIRd3EQ@...lic.gmane.org>
> 
> Due to certain hardware design challenges, we have opted to
> utilize a dedicated UART driver to probe the UART interface.
> 
> Presently, we have defined four parameters — 'fractional-division',
> 'invert-rts', 'invert-dtr', 'invert-cts', and 'invert-dsr' — which
> will be employed as needed.
> 
> Signed-off-by: Haowei Zheng <zhenghaowei-cXZgJK919ebM1kAEIRd3EQ@...lic.gmane.org>
> ---

Hi,

...

> +	data->rst = devm_reset_control_get_optional_shared(&pdev->dev, NULL);
> +	if (IS_ERR(data->rst))
> +		return PTR_ERR(data->rst);
> +
> +	device_property_read_u32(&pdev->dev, "clock-frequency", &port->uartclk);
> +
> +	ret = reset_control_deassert(data->rst);
> +	if (ret)
> +		goto err_unprepare;

Should reset_control_assert() be called if an error occurs later?

> +
> +	ret = serial8250_register_8250_port(&uart);
> +	if (ret < 0)
> +		goto err_unprepare;
> +
> +	platform_set_drvdata(pdev, data);
> +	data->line = ret;
> +
> +	return 0;
> +
> +err_unprepare:

What is this label for?

> +
> +	return ret;
> +}

CJ


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ