diff options
Diffstat (limited to 'drivers/thunderbolt/switch.c')
-rw-r--r-- | drivers/thunderbolt/switch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 26e76e4aa835..aeb982969629 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c | |||
@@ -260,11 +260,11 @@ struct tb_switch *get_switch_at_route(struct tb_switch *sw, u64 route) | |||
260 | if (route == 0) | 260 | if (route == 0) |
261 | return sw; | 261 | return sw; |
262 | if (next_port > sw->config.max_port_number) | 262 | if (next_port > sw->config.max_port_number) |
263 | return 0; | 263 | return NULL; |
264 | if (tb_is_upstream_port(&sw->ports[next_port])) | 264 | if (tb_is_upstream_port(&sw->ports[next_port])) |
265 | return 0; | 265 | return NULL; |
266 | if (!sw->ports[next_port].remote) | 266 | if (!sw->ports[next_port].remote) |
267 | return 0; | 267 | return NULL; |
268 | return get_switch_at_route(sw->ports[next_port].remote->sw, | 268 | return get_switch_at_route(sw->ports[next_port].remote->sw, |
269 | route >> TB_ROUTE_SHIFT); | 269 | route >> TB_ROUTE_SHIFT); |
270 | } | 270 | } |