net: kalmia: clean up bind error path
Subsystems (5)
PATCH 1/2 net: kalmia: clean up bind error path
Drop bogus call to usb_driver_release_interface() from an error path in the usbnet bind() callback, which is called during interface probe. At this point the interface is not bound and usb_driver_release_interface() returns early.
Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time bind() is called.
--- drivers/net/usb/kalmia.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/net/usb/kalmia.c +1 -5
@@ -150,12 +150,8 @@ kalmia_bind(struct usbnet *dev, struct usb_interface *intf) dev->rx_urb_size = dev->hard_mtu *10 ;// Found as optimal after testing status =kalmia_init_and_get_ethernet_addr (dev, ethernet_addr); - -if (status) { -usb_set_intfdata (intf,NULL ); -usb_driver_release_interface (driver_of (intf), intf); +if (status)return status; - }memcpy (dev->net->dev_addr, ethernet_addr,ETH_ALEN );
PATCH 2/2 net: cdc_eem: clean up bind error path
Drop bogus call to usb_driver_release_interface() from an error path in the usbnet bind() callback, which is called during interface probe. At this point the interface is not bound and usb_driver_release_interface() returns early.
Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time bind() is called.
--- drivers/net/usb/cdc_eem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/usb/cdc_eem.c +1 -4
@@ -83,11 +83,8 @@ static int eem_bind(struct usbnet *dev, struct usb_interface *intf)int status =0 ; status =usbnet_get_endpoints (dev, intf); -if (status <0 ) { -usb_set_intfdata (intf,NULL ); -usb_driver_release_interface (driver_of (intf), intf); +if (status <0 )return status; - }/* no jumbogram (16K) support for now */
Re: [PATCH net-next 2/2] net: cdc_eem: clean up bind error path
Am Mittwoch, den 07.03.2018, 10:46 +0100 schrieb Johan Hovold:
Quoted 10 lines
Drop bogus call to
usb_driver_release_interface()from an error path in the usbnetbind()callback, which is called during interface probe. At this point the interface is not bound andusb_driver_release_interface()returns early.Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time
bind()is called.Signed-off-by Johan Hovold <[email protected]>
Quoted 11 lines
--- drivers/net/usb/cdc_eem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/net/usb/cdc_eem.c +0
-0@@ -83,11 +83,8 @@ static int eem_bind(struct usbnet *dev, struct usb_interface *intf)int status =0 ;
drivers/net/usb/cdc_eem.c static int eem_bind(struct usbnet *dev, struct usb_interface *intf) · line 90
Quoted 10 lines
drivers/net/usb/cdc_eem.c +1
-4status =usbnet_get_endpoints (dev, intf); -if (status <0 ) { -usb_set_intfdata (intf,NULL ); -usb_driver_release_interface (driver_of (intf), intf); +if (status <0 )return status; - }/* no jumbogram (16K) support for now */
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Johan Hovold
Drop bogus call to
usb_driver_release_interface()from an error path in the usbnetbind()callback, which is called during interface probe. At this point the interface is not bound andusb_driver_release_interface()returns early.Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time
bind()is called.Signed-off-by Johan Hovold <[email protected]>
Re: [PATCH net-next 2/2] net: cdc_eem: clean up bind error path
In reply to Johan HovoldQuoted 10 lines · Johan Hovold
Drop bogus call to
usb_driver_release_interface()from an error path in the usbnetbind()callback, which is called during interface probe. At this point the interface is not bound andusb_driver_release_interface()returns early.Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time
bind()is called.Signed-off-by Johan Hovold <[email protected]>
David Miller
maintainerFrom: Johan Hovold <[email protected]>
Date: Wed, 7 Mar 2018 10:46:57 +0100
Quoted 10 lines
Drop bogus call to
usb_driver_release_interface()from an error path in the usbnetbind()callback, which is called during interface probe. At this point the interface is not bound andusb_driver_release_interface()returns early.Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time
bind()is called.Signed-off-by Johan Hovold <[email protected]>
Applied.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
David Miller
maintainerRe: [PATCH net-next 2/2] net: cdc_eem: clean up bind error path
In reply to Johan HovoldFrom: Johan Hovold <[email protected]>
Date: Wed, 7 Mar 2018 10:46:58 +0100
Quoted 10 lines
Drop bogus call to
usb_driver_release_interface()from an error path in the usbnetbind()callback, which is called during interface probe. At this point the interface is not bound andusb_driver_release_interface()returns early.Also remove the bogus call to clear the interface data, which is owned by the usbnet driver and would not even have been set by the time
bind()is called.Signed-off-by Johan Hovold <[email protected]>
Applied.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html