thunderbolt: Use NULL instead of 0 in switch.c
authorSachin Kamat <sachin.kamat@samsung.com>
Fri, 20 Jun 2014 09:02:31 +0000 (14:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jun 2014 16:44:42 +0000 (09:44 -0700)
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>
drivers/thunderbolt/switch.c

index 26e76e4aa835639d1eb293c57c7db695c61d4ac6..aeb9829696292a454fa3f721f0a0d6a6baaf1760 100644 (file)
@@ -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);
 }