media: iguanair: add sanity checks
authorOliver Neukum <oneukum@suse.com>
Tue, 30 Jul 2019 08:50:44 +0000 (05:50 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 10:47:47 +0000 (12:47 +0200)
commit88c430f6bf73475d85c94f660c7211ca1a267502
treefafa5cb6f6230d9033176dd1a42b2360a8ea96cb
parent9fce2e5eaecf9c671ac99e6bc9277d971ab7caa7
media: iguanair: add sanity checks

[ Upstream commit ab1cbdf159beba7395a13ab70bc71180929ca064 ]

The driver needs to check the endpoint types, too, as opposed
to the number of endpoints. This also requires moving the check earlier.

Reported-by: syzbot+01a77b82edaa374068e1@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/rc/iguanair.c