]> 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)
commita996b41ccf20677e52a5eb12d170918c9d94f8df
treeacb14035e16669d5e02c0541f3b3d991a1dc8d0d
parent5e6ae602f55f35f2aefd53415b365d3ae4911903
media: flexcop-usb: fix endpoint sanity check

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>
drivers/media/usb/b2c2/flexcop-usb.c