rsi: check length before USB read/write register
authorAmitkumar Karwar <amit.karwar@redpinesignals.com>
Tue, 11 Jul 2017 14:27:52 +0000 (19:57 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 28 Jul 2017 14:27:19 +0000 (17:27 +0300)
commit59f73e2ae185a6ab5c40f63657a83192bf054fb4
treea3eda328f17b242d230d634be96acabf6d28e721
parent523b724a769b69963ef46efa14b8b730b40419d5
rsi: check length before USB read/write register

These checks are required. Otherwise we may end up getting
memory corruption if invalid length is passed.

Fixes: b97e9b94ad75c ("rsi: Add new host interface operations")
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_91x_usb.c