Thread (13 messages) 13 messages, 2 authors, 2025-02-25

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

From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Date: 2025-02-24 04:19:59
Also in: linux-media, linux-rockchip, lkml

On 2/24/25 00:11, Christophe JAILLET wrote:
quoted
quoted
quoted
+    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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help