Re: [PATCH v8 4/6] media: platform: synopsys: Add support for HDMI input driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Best regards,
Dmitry




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux