Skip to contentSkip to conversation

net: cdc_ncm: drop redundant driver-data assignment

PATCH Applied Johan Hovold 2 participants 2 messages Mar 18, 2021 – Mar 19, 2021

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: cdc_ncm: drop redundant driver-data assignment

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.

---
 drivers/net/usb/cdc_ncm.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/usb/cdc_ncm.c +0 -1
index 8acf30115428..8ae565a801b5 100644
@@ -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) {
Signature · 1 line
2.26.2
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Thu, 18 Mar 2021 17:01:42 +0100 you wrote:

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.

[...]

Here is the summary with links:
- [net-next] net: cdc_ncm: drop redundant driver-data assignment

    https://git.kernel.org/netdev/net-next/c/269aa0301224

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html