UPSTREAM: cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind

usbnet_link_change will call schedule_work and should be
avoided if bind is failing. Otherwise we will end up with
scheduled work referring to a netdev which has gone away.

Instead of making the call conditional, we can just defer
it to usbnet_probe, using the driver_info flag made for
this purpose.

Fixes: 8a34b0ae8778 ("usbnet: cdc_ncm: apply usbnet_link_change")
Reported-by: Andrey Konovalov <>
Suggested-by: Linus Torvalds <>
Signed-off-by: Bjørn Mork <>
Signed-off-by: David S. Miller <>

Bug: 28744625
Patchset: net-usb-cdc-ncm-link-change-fix

(cherry-picked from 4d06dd537f95683aba3651098ae288b7cbff8274)
Signed-off-by: Mattias Nissler <>

Change-Id: I844c8cd517a4973a8a23621ffcc472251e000923
1 file changed