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: <268834ba-f6fe-4f7b-a211-7ee2b8f0bd46@collabora.com>
Date: Tue, 25 Feb 2025 07:33:09 +0300
From: Dmitry Osipenko <dmitry.osipenko@...labora.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
 Shreeya Patel <shreeya.patel@...labora.com>, Heiko Stuebner
 <heiko@...ech.de>, Mauro Carvalho Chehab <mchehab@...nel.org>,
 Hans Verkuil <hverkuil@...all.nl>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, jose.abreu@...opsys.com, nelson.costa@...opsys.com,
 shawn.wen@...k-chips.com, nicolas.dufresne@...labora.com,
 Sebastian Reichel <sebastian.reichel@...labora.com>
Cc: kernel@...labora.com, linux-media@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-rockchip@...ts.infradead.org, Tim Surber <me@...surber.de>
Subject: Re: [PATCH v8 4/6] media: platform: synopsys: Add support for HDMI
 input driver

On 2/24/25 22:16, Christophe JAILLET wrote:
> Le 24/02/2025 à 05:19, Dmitry Osipenko a écrit :
>> On 2/24/25 00:11, Christophe JAILLET wrote:
>>>>>
>>>>>> +    ret = cec_register_adapter(cec->adap, cec->dev);
>>>>>> +    if (ret < 0) {
>>>>>> +        dev_err(cec->dev, "cec register adapter failed\n");
>>>>>> +        cec_unregister_adapter(cec->adap);
>>>>>
>>>>> Is it needed to call cec_unregister_adapter() when
>>>>> cec_register_adapter() fails?
>>>>
>>>> Yes, it's confusing, but unregister is needed to free the adapter
>>>> properly, it's prepared to do it. Thanks for the review.
>>>>
>>>
>>> I don't know this API, so you'll get the last word, but
>>> cec_unregister_adapter() does not seem to do that many things in such a
>>> case, unless I miss something. See [1].
>>>
>>> CJ
>>>
>>> [1]: https://elixir.bootlin.com/linux/v6.14-rc3/source/drivers/media/
>>> cec/core/cec-core.c#L370
>>
>> On a second look, apparently you're right and
>> cec_notifier_cec_adap_unregister() should be used there.
>>
> 
> So, maybe in the .remove() function as well?

Nah, cec_unregister_adap shall be used on removal. It itself unregs
notifiers and etc.

-- 
Best regards,
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ