summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@samsung.com>2014-06-20 14:32:31 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-20 09:44:42 -0700
commitc9c2deef457c766a33c4862c9c198c20854d5fb6 (patch)
tree567215c862df7a1b593a0ac899316977fd66cd80 /drivers/thunderbolt
parent10fefe56bba413fb0525207c65cf50cf2a5afaff (diff)
downloadop-kernel-dev-c9c2deef457c766a33c4862c9c198c20854d5fb6.zip
op-kernel-dev-c9c2deef457c766a33c4862c9c198c20854d5fb6.tar.gz
thunderbolt: Use NULL instead of 0 in switch.c
The function returns a pointer. Hence return NULL instead of 0. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Andreas Noever <andreas.noever@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/switch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 26e76e4..aeb9829 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)
if (route == 0)
return sw;
if (next_port > sw->config.max_port_number)
- return 0;
+ return NULL;
if (tb_is_upstream_port(&sw->ports[next_port]))
- return 0;
+ return NULL;
if (!sw->ports[next_port].remote)
- return 0;
+ return NULL;
return get_switch_at_route(sw->ports[next_port].remote->sw,
route >> TB_ROUTE_SHIFT);
}
OpenPOWER on IntegriCloud