misc: tegra-profiler: fix coverity defect
Igor Nabirushkin [Sun, 12 Mar 2017 21:04:54 +0000 (01:04 +0400)]
Fix coverity defect "Bad bit shift operation".

Coverity ID: 33234

Bug 200192567

Change-Id: I7f0edb9c41ac9a9b624bafab3eab660968e57fef
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/1319568
(cherry picked from commit 40a0e6c7d697b72a05258c587c6062c9c6f09c65)

drivers/misc/tegra-profiler/dwarf_unwind.c

index 6afa6d3..149bc42 100644 (file)
@@ -563,7 +563,7 @@ dwarf_read_sleb128(struct ex_region_info *ri,
        num_bits = 8 * sizeof(result);
 
        if ((shift < num_bits) && (byte & 0x40))
-               result |= (-1 << shift);
+               result |= (-1L << shift);
 
        *ret = result;