From: Johan Hovold Date: Wed, 7 Mar 2018 09:46:58 +0000 (+0100) Subject: net: cdc_eem: clean up bind error path X-Git-Tag: v4.19~1326^2~263 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb5441fc3cc0e11be0ff9bbc6a00a74b3d2b0153;p=platform%2Fkernel%2Flinux-rpi3.git 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. Signed-off-by: Johan Hovold Acked-by: Oliver Neukum Reviewed-by: Greg Kroah-Hartman Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index f7180f8..61ea4ea 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 */