diff options
author | Sam Nelson <sam.nelson@ti.com> | 2019-10-07 13:22:18 -0400 |
---|---|---|
committer | Sam Nelson <sam.nelson@ti.com> | 2019-10-08 15:50:40 -0400 |
commit | 461eeaf43b391df26ee5680ce4694f3c099b3a99 (patch) | |
tree | 57c61615c18903c49604d55f015d27ac5afca21c | |
parent | 64cddbfaad2dca4e4ac9e96d6430c36eeeebbb25 (diff) | |
download | ipc-461eeaf43b391df26ee5680ce4694f3c099b3a99.tar.gz |
VirtQueue: Add additional checks to handle, assert not enabled
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
-rw-r--r-- | packages/ti/ipc/family/am65xx/VirtQueue.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/ti/ipc/family/am65xx/VirtQueue.c b/packages/ti/ipc/family/am65xx/VirtQueue.c index 26fa3c9..5b85be3 100644 --- a/packages/ti/ipc/family/am65xx/VirtQueue.c +++ b/packages/ti/ipc/family/am65xx/VirtQueue.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 Texas Instruments Incorporated - http://www.ti.com + * Copyright (c) 2017-2019 Texas Instruments Incorporated - http://www.ti.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -228,6 +228,10 @@ static Void _VirtQueue_init() /* register with xdc.runtime to get a diags mask */ result = Registry_addModule(&Registry_CURDESC, MODULE_NAME); Assert_isTrue(result == Registry_SUCCESS, (Assert_Id)NULL); + /* Additional check to handle case when Assert is disabled */ + if (result != Registry_SUCCESS) { + return; + } initialized = 1; } @@ -459,6 +463,10 @@ VirtQueue_Handle VirtQueue_create(UInt16 remoteProcId, VirtQueue_Params *params, result = Resource_physToVirt(vq->basePa, &(vq->baseVa)); Assert_isTrue(result == Resource_S_SUCCESS, (Assert_Id)NULL); + /* Additional check to handle case when Assert is disabled */ + if (result != Resource_S_SUCCESS) { + return (NULL); + } vringAddr = (Void *)vq->baseVa; break; |