On Mon Jul 6 19:24:59 2026 +0100, Sean Young wrote:
> Make rc_dev devm managed.
> 
> Fixes: dccc0c3ddf8f ("media: rc: fix race between unregister and urb/irq 
> callbacks")
> Signed-off-by: Sean Young <[email protected]>
> Reviewed-by: Martin Blumenstingl <[email protected]>
> Reviewed-by: Neil Armstrong <[email protected]>
> Cc: [email protected]
> Reviewed-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Sean Young

 drivers/media/rc/meson-ir-tx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

---

diff --git a/drivers/media/rc/meson-ir-tx.c b/drivers/media/rc/meson-ir-tx.c
index 6beb9e97453d..e8e3c1a30327 100644
--- a/drivers/media/rc/meson-ir-tx.c
+++ b/drivers/media/rc/meson-ir-tx.c
@@ -346,7 +346,7 @@ static int meson_irtx_probe(struct platform_device *pdev)
        if (ret)
                return dev_err_probe(dev, ret, "irq request failed\n");
 
-       rc = rc_allocate_device(RC_DRIVER_IR_RAW_TX);
+       rc = devm_rc_allocate_device(dev, RC_DRIVER_IR_RAW_TX);
        if (!rc)
                return -ENOMEM;
 
@@ -359,10 +359,8 @@ static int meson_irtx_probe(struct platform_device *pdev)
        rc->s_tx_duty_cycle = meson_irtx_set_duty_cycle;
 
        ret = devm_rc_register_device(dev, rc);
-       if (ret < 0) {
-               rc_free_device(rc);
+       if (ret < 0)
                return dev_err_probe(dev, ret, "rc_dev registration failed\n");
-       }
 
        return 0;
 }
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to