]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/radeon: remove assignment for return value
authorWambui Karuga <wambui@karuga.xyz>
Sat, 19 Oct 2019 07:32:42 +0000 (10:32 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 28 Oct 2019 15:19:00 +0000 (11:19 -0400)
Remove unnecessary assignment for return value and have the
function return the required value directly.
Issue found by coccinelle:
@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Wambui Karuga <wambui@karuga.xyz>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/cik.c

index 62eab82a64f9752f8e057891ca0b88969764582e..daff9a2af3bed3359665fb6ca5250747b71930a7 100644 (file)
@@ -221,9 +221,7 @@ int ci_get_temp(struct radeon_device *rdev)
        else
                actual_temp = temp & 0x1ff;
 
-       actual_temp = actual_temp * 1000;
-
-       return actual_temp;
+       return actual_temp * 1000;
 }
 
 /* get temperature in millidegrees */
@@ -239,9 +237,7 @@ int kv_get_temp(struct radeon_device *rdev)
        else
                actual_temp = 0;
 
-       actual_temp = actual_temp * 1000;
-
-       return actual_temp;
+       return actual_temp * 1000;
 }
 
 /*