In case usb configuration is unknown (cdev->config == NULL), non standard
request should not be processed.
Remove also the cdev->config check below which will never happen.
This issue was seen using ums feature.
Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
ctrl->bRequestType, ctrl->bRequest,
w_value, w_index, w_length);
+ if (!cdev->config)
+ goto done;
+
/*
* functions always handle their interfaces and endpoints...
* punt other recipients (other, WUSB, ...) to the current
value = f->setup(f, ctrl);
else {
c = cdev->config;
- if (c && c->setup)
+ if (c->setup)
value = c->setup(c, ctrl);
}