Skip to content

Commit

Permalink
net: cdc_ncm: drop redundant driver-data assignment
Browse files Browse the repository at this point in the history
The driver data for the data interface has already been set by
usb_driver_claim_interface() so drop the subsequent redundant
assignment.

Note that this also avoids setting the driver data three times in case
of a combined interface.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Johan Hovold authored and David S. Miller committed Mar 19, 2021
1 parent 92a310c commit 269aa03
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/usb/cdc_ncm.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,6 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
goto error2;
}

usb_set_intfdata(ctx->data, dev);
usb_set_intfdata(ctx->control, dev);

if (ctx->ether_desc) {
Expand Down

0 comments on commit 269aa03

Please sign in to comment.