diff --git a/sealing_key/src/sealing_key.c b/sealing_key/src/sealing_key.c index b582dd5df9c7a69f40b3254403a6d45dbc17511a..65283d0ea68ad205cbb726a0c5638051d06a1e5b 100644 --- a/sealing_key/src/sealing_key.c +++ b/sealing_key/src/sealing_key.c @@ -57,11 +57,11 @@ static int smc_sealing_key(uint32_t alg, uint8_t *user_param, uint32_t user_para static int check_malloc_params(struct sealing_key_params *seal_params, uint8_t **user_param, uint8_t **sealing_key) { if (seal_params->alg != SEALING_HMAC_SHA256) { - ERR("not support alg %d\n", seal_params->alg); + ERR("not support alg %u\n", seal_params->alg); return -EINVAL; } if (seal_params->user_param_len != 0 && seal_params->user_param_len != SEALING_PARAM_LEN) { - ERR("invalid user_param len %d", seal_params->user_param_len); + ERR("invalid user_param len %u", seal_params->user_param_len); return -EINVAL; } @@ -144,7 +144,7 @@ static long seal_device_ioctl(struct file *fp, unsigned int cmd, unsigned long a ret = cmd_get_sealing_key(argp); break; default: - ERR("invalid command %d", cmd); + ERR("invalid command %u", cmd); ret = -ENOTTY; } @@ -214,4 +214,7 @@ static void __exit seal_exit(void) module_init(seal_init); module_exit(seal_exit); -MODULE_LICENSE("GPL"); \ No newline at end of file + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Chenzheng "); +MODULE_DESCRIPTION("Get sealing key from tmm module"); \ No newline at end of file diff --git a/tmm_driver/src/tmm_driver.c b/tmm_driver/src/tmm_driver.c index a71656d36a5cf1f526b0c372fb4ce81745dd0aff..e3a1480ab3321d0d03dcc1390c8861ada395d1bd 100644 --- a/tmm_driver/src/tmm_driver.c +++ b/tmm_driver/src/tmm_driver.c @@ -14,7 +14,7 @@ #include MODULE_LICENSE("GPL"); -MODULE_AUTHOR("HUAWEI TECHNOLOGIES CO., LTD."); +MODULE_AUTHOR("Chenzheng "); MODULE_DESCRIPTION("Get tmm base memory info module"); #define TMM_MAX_NODE_NUM 8 @@ -380,6 +380,10 @@ static int __init tmm_driver_init(void) int rc; tmm_kobj = kobject_create_and_add("tmm", kernel_kobj); + if (tmm_kobj == NULL) { + pr_err("tmm_driver: create tmm kobject failed\n"); + return -1; + } rc = sysfs_create_file(tmm_kobj, &memory_info_attr.attr); if (rc) {