]> 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)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 24 Feb 2020 15:23:28 +0000 (16:23 +0100)
commit003e977f120cf54696a7bfb253c5a83490927924
treeacb14035e16669d5e02c0541f3b3d991a1dc8d0d
parentcb83fac3b104ac89546966f00069db8c98c43e2d
media: flexcop-usb: fix endpoint sanity check

commit c9fbdf34101f ("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: c9fbdf34101f ("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>
drivers/media/usb/b2c2/flexcop-usb.c