summaryrefslogtreecommitdiff
path: root/drivers/staging/ozwpan
diff options
context:
space:
mode:
authorRupesh Gujare <rupesh.gujare@atmel.com>2013-08-23 18:33:28 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-26 06:27:42 -0700
commit050596a488d7de6bef1ab60d25cecadf96aa788a (patch)
treedf61528f737ac66d30c7e195782192ae52549a60 /drivers/staging/ozwpan
parent9d5829bfbae67d3b185a1360185ea56af163147d (diff)
staging: ozwpan: Check for correct config number.
Check for valid config number before completing set interface. Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ozwpan')
-rw-r--r--drivers/staging/ozwpan/ozhcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index ab93b74e34be..83ed64c72872 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -909,7 +909,7 @@ static void oz_hcd_complete_set_interface(struct oz_port *port, struct urb *urb,
struct usb_hcd *hcd = port->ozhcd->hcd;
int rc = 0;
- if (rcode == 0) {
+ if ((rcode == 0) && (port->config_num > 0)) {
struct usb_host_config *config;
struct usb_host_interface *intf;
oz_dbg(ON, "Set interface %d alt %d\n", if_num, alt);