staging: greybus: compress return logic
authorArushi Singhal <arushisinghal19971997@gmail.com>
Sat, 25 Mar 2017 05:20:07 +0000 (10:50 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Mar 2017 12:24:49 +0000 (14:24 +0200)
Simplify function returns by merging assignment and return.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/loopback.c

index aaf29a5fac8392cbcee5abcbf5b775f9bf6cf28e..08e2558842061f794aa8beb05ab3856cbf8e2f3c 100644 (file)
@@ -365,11 +365,8 @@ static void gb_loopback_calculate_stats(struct gb_loopback *gb, bool error);
 
 static u32 gb_loopback_nsec_to_usec_latency(u64 elapsed_nsecs)
 {
-       u32 lat;
-
        do_div(elapsed_nsecs, NSEC_PER_USEC);
-       lat = elapsed_nsecs;
-       return lat;
+       return elapsed_nsecs;
 }
 
 static u64 __gb_loopback_calc_latency(u64 t1, u64 t2)