media: ir_toy: assignment to be16 should be of correct type
authorSean Young <sean@mess.org>
Wed, 13 Oct 2021 08:14:10 +0000 (09:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:34 +0000 (19:16 +0100)
[ Upstream commit febfe985fc2ea052a363f6525ff624b8efd5273c ]

commit f0c15b360fb6 ("media: ir_toy: prevent device from hanging during
transmit") removed a cpu_to_be16() cast, which causes a sparse warning.

Fixes: f0c15b360fb6 ("media: ir_toy: prevent device from hanging during transmit")
Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/rc/ir_toy.c

index 48d52baec1a1c981f2cd0122d8fe03911c7373cd..1aa7989e756ccd967ca376ce0201911f3f5c4708 100644 (file)
@@ -310,7 +310,7 @@ static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count)
                buf[i] = cpu_to_be16(v);
        }
 
-       buf[count] = 0xffff;
+       buf[count] = cpu_to_be16(0xffff);
 
        irtoy->tx_buf = buf;
        irtoy->tx_len = size;