misc: tegra-profiler: fix Coverity issue of NULL dereference
authorDeepak Nibade <dnibade@nvidia.com>
Fri, 25 Jul 2014 07:05:45 +0000 (12:05 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 30 Jan 2015 06:00:59 +0000 (22:00 -0800)
commite3676b21f65a6a271e063fd160aea44850d0d0a4
tree38e2408c01cd5409174c744fa437a835b2a35375
parent7834a7a15b4086d98d97c0fcf69713c6f8c9e625
misc: tegra-profiler: fix Coverity issue of NULL dereference

Pointer "pt_regs *regs" is first dereferenced and then checked for NULL
To fix this move NULL checking to beginning of function
Coverity id : 26686

Bug 1416640
Bug 1598009

Change-Id: I40e97e38e5a61a5d77ea68fa511e996f24385cfc
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/447532
(cherry picked from commit 4651be4faa111a0ff64a924889b69ec56ae19ace)
Reviewed-on: http://git-master/r/672015
GVS: Gerrit_Virtual_Submit
Reviewed-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Tested-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
drivers/misc/tegra-profiler/eh_unwind.c