USB: cdc-acm: more sanity checking
[deliverable/linux.git] / drivers / usb / class / cdc-acm.c
index 1d2c99af253240786ed74c65027e6c8e26d61f25..83fd30b0577c55f33eace402617ff3a2a4b09126 100644 (file)
@@ -1179,6 +1179,9 @@ static int acm_probe(struct usb_interface *intf,
        if (quirks == NO_UNION_NORMAL) {
                data_interface = usb_ifnum_to_if(usb_dev, 1);
                control_interface = usb_ifnum_to_if(usb_dev, 0);
+               /* we would crash */
+               if (!data_interface || !control_interface)
+                       return -ENODEV;
                goto skip_normal_probe;
        }
 
This page took 0.024092 seconds and 5 git commands to generate.