summaryrefslogtreecommitdiff
path: root/drivers/media/rc/redrat3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/rc/redrat3.c')
-rw-r--r--drivers/media/rc/redrat3.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c
index 49731b1a9c57..9f5a17bb5ef5 100644
--- a/drivers/media/rc/redrat3.c
+++ b/drivers/media/rc/redrat3.c
@@ -890,6 +890,9 @@ static int redrat3_set_tx_carrier(struct rc_dev *rcdev, u32 carrier)
struct device *dev = rr3->dev;
rr3_dbg(dev, "Setting modulation frequency to %u", carrier);
+ if (carrier == 0)
+ return -EINVAL;
+
rr3->carrier = carrier;
return carrier;