summaryrefslogtreecommitdiff
path: root/security/tf_driver/tf_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/tf_driver/tf_device.c')
-rw-r--r--security/tf_driver/tf_device.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/security/tf_driver/tf_device.c b/security/tf_driver/tf_device.c
index ad44b46c2067..8f31bf35f90a 100644
--- a/security/tf_driver/tf_device.c
+++ b/security/tf_driver/tf_device.c
@@ -87,7 +87,7 @@ static long tf_device_ioctl(
/*
* Implements the device shutdown callback.
*/
-static int tf_device_shutdown(void);
+static void tf_device_shutdown(void);
/*
@@ -99,7 +99,7 @@ static int tf_device_suspend(void);
/*
* Implements the device resume callback.
*/
-static int tf_device_resume(void);
+static void tf_device_resume(void);
/*---------------------------------------------------------------------------
@@ -393,7 +393,7 @@ static int __init tf_device_register(void)
}
#ifdef CONFIG_TF_DRIVER_CRYPTO_FIPS
- error = tf_self_test_post_init(&(dev_stats->kobj));
+ error = tf_self_test_post_init(&(g_tf_dev.kobj));
/* N.B. error > 0 indicates a POST failure, which will not
prevent the module from loading. */
if (error < 0) {
@@ -762,11 +762,10 @@ exit:
/*----------------------------------------------------------------------------*/
-static int tf_device_shutdown(void)
+static void tf_device_shutdown(void)
{
-
- return tf_power_management(&g_tf_dev.sm,
- TF_POWER_OPERATION_SHUTDOWN);
+ if (0 > tf_power_management(&g_tf_dev.sm, TF_POWER_OPERATION_SHUTDOWN))
+ dprintk(KERN_ERR "tf_device_shutdown failing\n");
}
/*----------------------------------------------------------------------------*/
@@ -781,10 +780,10 @@ static int tf_device_suspend(void)
/*----------------------------------------------------------------------------*/
-static int tf_device_resume(void)
+static void tf_device_resume(void)
{
- return tf_power_management(&g_tf_dev.sm,
- TF_POWER_OPERATION_RESUME);
+ if (0 > tf_power_management(&g_tf_dev.sm, TF_POWER_OPERATION_RESUME))
+ dprintk(KERN_ERR "tf_device_resume failing\n");
}