target: fix regression with dev_link_magic in target_fabric_port_link

This is to fix a regression that only affect the stable (not for the mainline)
that the stable commit fdf9d86 was incorrectly placed dev->dev_link_magic check
before the *dev assignment in target_fabric_port_link() due to fuzzy automatically
context adjustment during the back-porting.

Reported-by: Chris Boot <>
Signed-off-by: Nicholas Bellinger <>
Signed-off-by: CAI Qian <>
Signed-off-by: Greg Kroah-Hartman <>

1 file changed