misc: tegra_profiler: fix build warnings
Igor Nabirushkin [Tue, 7 Oct 2014 05:10:31 +0000 (09:10 +0400)]
Fix build warnings for Tegra Profiler.

Bug 1562287
Bug 1598009

Change-Id: I3bab0fdea33a217a8f13284329e6edec9fe35c50
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
(cherry picked from commit 27796155c4a7d33878c0c82c955d6c467d162651)
Reviewed-on: http://git-master/r/672024
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

drivers/misc/tegra-profiler/eh_unwind.c

index 072aa3c..a8f13ee 100644 (file)
@@ -137,8 +137,10 @@ validate_mmap_addr(struct quadd_extabs_mmap *mmap,
 static inline long
 read_mmap_data(struct quadd_extabs_mmap *mmap, const u32 *addr, u32 *retval)
 {
-       if (!validate_mmap_addr(mmap, (unsigned long)addr, sizeof(u32)))
+       if (!validate_mmap_addr(mmap, (unsigned long)addr, sizeof(u32))) {
+               *retval = 0;
                return -QUADD_URC_EACCESS;
+       }
 
        *retval = *addr;
        return 0;