zd1211rw: fix storage endpoint lookup
authorJohan Hovold <johan@kernel.org>
Tue, 10 Dec 2019 11:44:26 +0000 (12:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Feb 2020 14:18:04 +0000 (14:18 +0000)
commit108b4537f1a450a4b979857f3ad5113e485917ba
tree434b309a3defee90fca494e76dbe3e0f78fc3d6a
parent419d0f93ac3c043c73b6387090cb3bee416e53fe
zd1211rw: fix storage endpoint lookup

commit 2d68bb2687abb747558b933e80845ff31570a49c upstream.

Make sure to use the current alternate setting when verifying the
storage interface descriptors to avoid submitting an URB to an invalid
endpoint.

Failing to do so could cause the driver to misbehave or trigger a WARN()
in usb_submit_urb() that kernels with panic_on_warn set would choke on.

Fixes: a1030e92c150 ("[PATCH] zd1211rw: Convert installer CDROM device into WLAN device")
Cc: stable <stable@vger.kernel.org> # 2.6.19
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/zydas/zd1211rw/zd_usb.c