All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] net: kalmia: clean up bind error path
@ 2018-03-07  9:46 ` Johan Hovold
  0 siblings, 0 replies; 14+ messages in thread
From: Johan Hovold @ 2018-03-07  9:46 UTC (permalink / raw)
  To: David S. Miller, Oliver Neukum; +Cc: linux-usb, netdev, Johan Hovold

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.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/usb/kalmia.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c
index 1ec523b0e932..bd2ba3659028 100644
--- a/drivers/net/usb/kalmia.c
+++ b/drivers/net/usb/kalmia.c
@@ -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);
 
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [net-next,1/2] net: kalmia: clean up bind error path
@ 2018-03-07  9:46 ` Johan Hovold
  0 siblings, 0 replies; 14+ messages in thread
From: Johan Hovold @ 2018-03-07  9:46 UTC (permalink / raw)
  To: David S. Miller, Oliver Neukum; +Cc: linux-usb, netdev, Johan Hovold

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.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/usb/kalmia.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c
index 1ec523b0e932..bd2ba3659028 100644
--- a/drivers/net/usb/kalmia.c
+++ b/drivers/net/usb/kalmia.c
@@ -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);
 

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH net-next 2/2] net: cdc_eem: clean up bind error path
@ 2018-03-07  9:46   ` Johan Hovold
  0 siblings, 0 replies; 14+ messages in thread
From: Johan Hovold @ 2018-03-07  9:46 UTC (permalink / raw)
  To: David S. Miller, Oliver Neukum; +Cc: linux-usb, netdev, Johan Hovold

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.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/usb/cdc_eem.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
index f7180f8db39e..61ea4eaace5d 100644
--- a/drivers/net/usb/cdc_eem.c
+++ b/drivers/net/usb/cdc_eem.c
@@ -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 */
 
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [net-next,2/2] net: cdc_eem: clean up bind error path
@ 2018-03-07  9:46   ` Johan Hovold
  0 siblings, 0 replies; 14+ messages in thread
From: Johan Hovold @ 2018-03-07  9:46 UTC (permalink / raw)
  To: David S. Miller, Oliver Neukum; +Cc: linux-usb, netdev, Johan Hovold

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.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/usb/cdc_eem.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
index f7180f8db39e..61ea4eaace5d 100644
--- a/drivers/net/usb/cdc_eem.c
+++ b/drivers/net/usb/cdc_eem.c
@@ -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 */
 

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH net-next 2/2] net: cdc_eem: clean up bind error path
@ 2018-03-07 10:30     ` Oliver Neukum
  0 siblings, 0 replies; 14+ messages in thread
From: Oliver Neukum @ 2018-03-07 10:30 UTC (permalink / raw)
  To: Johan Hovold, David S. Miller; +Cc: linux-usb, netdev

Am Mittwoch, den 07.03.2018, 10:46 +0100 schrieb Johan Hovold:
> 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.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Oliver Neukum <oneukum@suse.com>
> ---
>  drivers/net/usb/cdc_eem.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
> index f7180f8db39e..61ea4eaace5d 100644
> --- a/drivers/net/usb/cdc_eem.c
> +++ b/drivers/net/usb/cdc_eem.c
> @@ -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 */
>  

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [net-next,2/2] net: cdc_eem: clean up bind error path
@ 2018-03-07 10:30     ` Oliver Neukum
  0 siblings, 0 replies; 14+ messages in thread
From: Oliver Neukum @ 2018-03-07 10:30 UTC (permalink / raw)
  To: Johan Hovold, David S. Miller; +Cc: linux-usb, netdev

Am Mittwoch, den 07.03.2018, 10:46 +0100 schrieb Johan Hovold:
> 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.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Oliver Neukum <oneukum@suse.com>
> ---
>  drivers/net/usb/cdc_eem.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
> index f7180f8db39e..61ea4eaace5d 100644
> --- a/drivers/net/usb/cdc_eem.c
> +++ b/drivers/net/usb/cdc_eem.c
> @@ -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 */
>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH net-next 1/2] net: kalmia: clean up bind error path
@ 2018-03-07 14:56   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2018-03-07 14:56 UTC (permalink / raw)
  To: Johan Hovold; +Cc: David S. Miller, Oliver Neukum, linux-usb, netdev

On Wed, Mar 07, 2018 at 10:46:57AM +0100, Johan Hovold wrote:
> 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.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [net-next,1/2] net: kalmia: clean up bind error path
@ 2018-03-07 14:56   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 14+ messages in thread
From: Greg Kroah-Hartman @ 2018-03-07 14:56 UTC (permalink / raw)
  To: Johan Hovold; +Cc: David S. Miller, Oliver Neukum, linux-usb, netdev

On Wed, Mar 07, 2018 at 10:46:57AM +0100, Johan Hovold wrote:
> 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.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH net-next 2/2] net: cdc_eem: clean up bind error path
@ 2018-03-07 14:56     ` Greg KH
  0 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2018-03-07 14:56 UTC (permalink / raw)
  To: Johan Hovold; +Cc: David S. Miller, Oliver Neukum, linux-usb, netdev

On Wed, Mar 07, 2018 at 10:46:58AM +0100, Johan Hovold wrote:
> 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.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [net-next,2/2] net: cdc_eem: clean up bind error path
@ 2018-03-07 14:56     ` Greg KH
  0 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2018-03-07 14:56 UTC (permalink / raw)
  To: Johan Hovold; +Cc: David S. Miller, Oliver Neukum, linux-usb, netdev

On Wed, Mar 07, 2018 at 10:46:58AM +0100, Johan Hovold wrote:
> 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.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH net-next 1/2] net: kalmia: clean up bind error path
@ 2018-03-07 20:39   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2018-03-07 20:39 UTC (permalink / raw)
  To: johan; +Cc: oliver, linux-usb, netdev

From: Johan Hovold <johan@kernel.org>
Date: Wed,  7 Mar 2018 10:46:57 +0100

> 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.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [net-next,1/2] net: kalmia: clean up bind error path
@ 2018-03-07 20:39   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2018-03-07 20:39 UTC (permalink / raw)
  To: johan; +Cc: oliver, linux-usb, netdev

From: Johan Hovold <johan@kernel.org>
Date: Wed,  7 Mar 2018 10:46:57 +0100

> 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.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

Applied.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH net-next 2/2] net: cdc_eem: clean up bind error path
@ 2018-03-07 20:39     ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2018-03-07 20:39 UTC (permalink / raw)
  To: johan; +Cc: oliver, linux-usb, netdev

From: Johan Hovold <johan@kernel.org>
Date: Wed,  7 Mar 2018 10:46:58 +0100

> 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.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [net-next,2/2] net: cdc_eem: clean up bind error path
@ 2018-03-07 20:39     ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2018-03-07 20:39 UTC (permalink / raw)
  To: johan; +Cc: oliver, linux-usb, netdev

From: Johan Hovold <johan@kernel.org>
Date: Wed,  7 Mar 2018 10:46:58 +0100

> 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.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

Applied.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-03-07 20:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07  9:46 [PATCH net-next 1/2] net: kalmia: clean up bind error path Johan Hovold
2018-03-07  9:46 ` [net-next,1/2] " Johan Hovold
2018-03-07  9:46 ` [PATCH net-next 2/2] net: cdc_eem: " Johan Hovold
2018-03-07  9:46   ` [net-next,2/2] " Johan Hovold
2018-03-07 10:30   ` [PATCH net-next 2/2] " Oliver Neukum
2018-03-07 10:30     ` [net-next,2/2] " Oliver Neukum
2018-03-07 14:56   ` [PATCH net-next 2/2] " Greg KH
2018-03-07 14:56     ` [net-next,2/2] " Greg KH
2018-03-07 20:39   ` [PATCH net-next 2/2] " David Miller
2018-03-07 20:39     ` [net-next,2/2] " David Miller
2018-03-07 14:56 ` [PATCH net-next 1/2] net: kalmia: " Greg KH
2018-03-07 14:56   ` [net-next,1/2] " Greg Kroah-Hartman
2018-03-07 20:39 ` [PATCH net-next 1/2] " David Miller
2018-03-07 20:39   ` [net-next,1/2] " David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.