On Fri Sep 4 10:09:16 2026 +0100, Sean Young wrote:
> Reject any carrier the hardware cannot generate. This also fixes
> a divide by zero if a carrier of U32_MAX/16 is set.
>
> Fixes: 8bff1386d62d ("media: ir_toy: allow tx carrier to be set")
> Cc: [email protected]
> Signed-off-by: Sean Young <[email protected]>
> Acked-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Sean Young
drivers/media/rc/ir_toy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/drivers/media/rc/ir_toy.c b/drivers/media/rc/ir_toy.c
index 286c8543aa5a..58b23d08a897 100644
--- a/drivers/media/rc/ir_toy.c
+++ b/drivers/media/rc/ir_toy.c
@@ -372,7 +372,7 @@ static int irtoy_tx_carrier(struct rc_dev *rc, uint32_t
carrier)
u8 buf[3];
int err;
- if (carrier < 11800)
+ if (carrier < 11800 || carrier > 3000000)
return -EINVAL;
buf[0] = 0x06;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]