Skip to content

Commit 4c4ca3c

Browse files
oneukumkuba-moo
authored andcommitted
usb: net: sierra: check for no status endpoint
The driver checks for having three endpoints and having bulk in and out endpoints, but not that the third endpoint is interrupt input. Rectify the omission. Reported-by: [email protected] Closes: https://lore.kernel.org/linux-usb/[email protected]/ Tested-by: [email protected] Fixes: eb4fd8c ("net/usb: add sierra_net.c driver") Signed-off-by: Oliver Neukum <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 0e94189 commit 4c4ca3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/usb/sierra_net.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,10 @@ static int sierra_net_bind(struct usbnet *dev, struct usb_interface *intf)
689689
status);
690690
return -ENODEV;
691691
}
692+
if (!dev->status) {
693+
dev_err(&dev->udev->dev, "No status endpoint found");
694+
return -ENODEV;
695+
}
692696
/* Initialize sierra private data */
693697
priv = kzalloc(sizeof *priv, GFP_KERNEL);
694698
if (!priv)

0 commit comments

Comments
 (0)