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:30:19 +0000 (12:30 +0200)
commit58079da947440347d1455423c6e9f1aec0748267
tree96b2cd963dd9dba9b5eb7c349eb8bd310699f67e
parentdfc2c4a32775bdb0fc139da9d790e5dc01971d40
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