[FOSS_TLK]platform: tegra: check ss callback status
Scott Long [Thu, 26 Mar 2015 00:15:05 +0000 (17:15 -0700)]
Modify platform_ss_request_handler() to check
r1 for return status code from secure storage
callback handler and to fail accordingly.

Change-Id: Ibfc6992b8d504bffea31a617e7350d8ebccb4df5
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/752881
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

platform/tegra/common/platform.c

index 6d40b08..d48865b 100644 (file)
@@ -226,6 +226,10 @@ int platform_ss_request_handler(void)
 
        (void)tz_switch_to_ns(SMC_TOS_PREEMPTED, &frame);
 
+       /* check status of fs preempt handler */
+       if (frame.r[1] != OTE_SUCCESS)
+               return -EIO;
+
        return 0;
 }