]> git.baikalelectronics.ru Git - kernel.git/commit
media: flexcop-usb: fix endpoint sanity check
authorJohan Hovold <johan@kernel.org>
Fri, 3 Jan 2020 16:35:08 +0000 (17:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:02:15 +0000 (11:02 +0200)
commit47980834c4adea372d411c4f36a73c3d01cece66
tree428f027d0ae85b4107bb7954a5f47a3f0b46b198
parent1338ba300e13abc74c03b1ab82327a5409630d3a
media: flexcop-usb: fix endpoint sanity check

commit a996b41ccf20677e52a5eb12d170918c9d94f8df upstream.

commit 06c435ecc107 ("media: b2c2-flexcop-usb: add sanity checking") added
an endpoint sanity check to address a NULL-pointer dereference on probe.
Unfortunately the check was done on the current altsetting which was later
changed.

Fix this by moving the sanity check to after the altsetting is changed.

Fixes: 06c435ecc107 ("media: b2c2-flexcop-usb: add sanity checking")
Cc: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/b2c2/flexcop-usb.c