diff options
Diffstat (limited to 'drivers/media/rc/ir_toy.c')
-rw-r--r-- | drivers/media/rc/ir_toy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/rc/ir_toy.c b/drivers/media/rc/ir_toy.c index 7f3942774..cd2fddf00 100644 --- a/drivers/media/rc/ir_toy.c +++ b/drivers/media/rc/ir_toy.c @@ -324,6 +324,7 @@ static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count) sizeof(COMMAND_SMODE_EXIT), STATE_RESET); if (err) { dev_err(irtoy->dev, "exit sample mode: %d\n", err); + kfree(buf); return err; } @@ -331,6 +332,7 @@ static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count) sizeof(COMMAND_SMODE_ENTER), STATE_COMMAND); if (err) { dev_err(irtoy->dev, "enter sample mode: %d\n", err); + kfree(buf); return err; } |