aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gud
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gud')
-rw-r--r--drivers/gud/MobiCoreDriver/mcDrvModule.c5
-rw-r--r--drivers/gud/MobiCoreKernelApi/main.c3
-rw-r--r--drivers/gud/include/Mci/mcifc.h1
3 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gud/MobiCoreDriver/mcDrvModule.c b/drivers/gud/MobiCoreDriver/mcDrvModule.c
index 8e1c07f..0914abe 100644
--- a/drivers/gud/MobiCoreDriver/mcDrvModule.c
+++ b/drivers/gud/MobiCoreDriver/mcDrvModule.c
@@ -486,7 +486,7 @@ static struct mcL2TablesDescr *allocateWsmL2TableContainer(
SetPageReserved(pPage);
/* allocate a descriptor */
- pWsmL2TablesChunk = kmalloc(sizeof(*pWsmL2TablesChunk),
+ pWsmL2TablesChunk = kmalloc(sizeof(struct mcL2TablesChunk),
GFP_KERNEL);
if (NULL == pWsmL2TablesChunk) {
kfree(pWsmL2Page);
@@ -526,7 +526,8 @@ static struct mcL2TablesDescr *allocateWsmL2TableContainer(
if (0 != ret) {
if (NULL != pWsmL2TableDescr) {
/* remove from list */
- list_del(&(pWsmL2TablesChunk->list));
+ if (pWsmL2TablesChunk != NULL)
+ list_del(&(pWsmL2TablesChunk->list));
/* free memory */
kfree(pWsmL2TableDescr);
pWsmL2TableDescr = NULL;
diff --git a/drivers/gud/MobiCoreKernelApi/main.c b/drivers/gud/MobiCoreKernelApi/main.c
index e210483..a3e2e62 100644
--- a/drivers/gud/MobiCoreKernelApi/main.c
+++ b/drivers/gud/MobiCoreKernelApi/main.c
@@ -142,6 +142,7 @@ static int __init mcapi_init(void)
if (!modCtx->sk) {
MCDRV_ERROR("register of recieve handler failed");
+ kfree(modCtx);
return -EFAULT;
}
@@ -167,4 +168,4 @@ module_exit(mcapi_exit);
MODULE_AUTHOR("Giesecke & Devrient GmbH");
MODULE_LICENSE("Dual BSD/GPL");
-MODULE_DESCRIPTION("MobiCore API driver"); \ No newline at end of file
+MODULE_DESCRIPTION("MobiCore API driver");
diff --git a/drivers/gud/include/Mci/mcifc.h b/drivers/gud/include/Mci/mcifc.h
index 4a2e26b..cbb1e01 100644
--- a/drivers/gud/include/Mci/mcifc.h
+++ b/drivers/gud/include/Mci/mcifc.h
@@ -38,6 +38,7 @@
#define MC_FC_CP15_REG ((uint32_t)(-101)) /**< general CP15/cache register update */
// --- store value in sDDRRAM ---
#define MC_FC_STORE_BINFO ((uint32_t)(-201)) /**< write a 32bit value in secure DDRRAM in incremented art (max 2kB) */
+#define MC_FC_LOAD_BINFO ((uint32_t)(-202)) /**< load a 32bit value from secure DDRRAM using an offset */
#define MC_FC_MAX_ID ((uint32_t)(0xFFFF0000)) /**< Maximum allowed FastCall ID */