Commit e3be44cd authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

Revert "cdc-acm: hardening against malicious devices"

This reverts commit 2ad9d544.

Drop bogus sanity check; an interface in the active configuration will
always have a current altsetting assigned by USB core.
Acked-by: default avatarOliver Neukum <oneukum@suse.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20200921135951.24045-2-johan@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dbb29de7
......@@ -1197,9 +1197,6 @@ static int acm_probe(struct usb_interface *intf,
return -EINVAL;
}
if (!intf->cur_altsetting)
return -EINVAL;
if (!buflen) {
if (intf->cur_altsetting->endpoint &&
intf->cur_altsetting->endpoint->extralen &&
......@@ -1253,8 +1250,6 @@ static int acm_probe(struct usb_interface *intf,
dev_dbg(&intf->dev, "no interfaces\n");
return -ENODEV;
}
if (!data_interface->cur_altsetting || !control_interface->cur_altsetting)
return -ENODEV;
if (data_intf_num != call_intf_num)
dev_dbg(&intf->dev, "Separate call control interface. That is not fully supported.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment