Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
--- a/src/g997/drv_dsl_cpe_api_g997_danube.c
|
||||
+++ b/src/g997/drv_dsl_cpe_api_g997_danube.c
|
||||
@@ -1984,41 +1984,53 @@ DSL_Error_t DSL_DRV_DEV_G997_DeltHlogGet
|
||||
{
|
||||
if (nDirection == DSL_DOWNSTREAM)
|
||||
{
|
||||
- DSL_G997_DeltHlogData_t HlogData;
|
||||
+ DSL_G997_DeltHlogData_t *HlogData;
|
||||
|
||||
- memset(&HlogData, 0x0, sizeof(DSL_G997_DeltHlogData_t));
|
||||
+ HlogData = kzalloc(sizeof(*HlogData), GFP_KERNEL);
|
||||
+ if (!HlogData)
|
||||
+ {
|
||||
+ DSL_DEBUG(DSL_DBG_ERR,
|
||||
+ (pContext, "DSL[%02d]: ERROR - Alloc HlogData failed!"DSL_DRV_CRLF,
|
||||
+ DSL_DEV_NUM(pContext)));
|
||||
+ return DSL_ERR_MEMORY;
|
||||
+ }
|
||||
+
|
||||
+ memset(HlogData, 0x0, sizeof(DSL_G997_DeltHlogData_t));
|
||||
|
||||
/* Get SHOWTIME Hlog values*/
|
||||
nErrCode = DSL_DRV_DANUBE_G997_DeltHlogGet(
|
||||
- pContext, nDirection, &HlogData);
|
||||
+ pContext, nDirection, HlogData);
|
||||
if (nErrCode != DSL_SUCCESS)
|
||||
{
|
||||
DSL_DEBUG(DSL_DBG_ERR,
|
||||
(pContext, "DSL[%02d]: ERROR - Showtime Hlog get failed!"DSL_DRV_CRLF,
|
||||
DSL_DEV_NUM(pContext)));
|
||||
+ kfree(HlogData);
|
||||
return nErrCode;
|
||||
}
|
||||
|
||||
/* if actual group size != 1, values should be spread */
|
||||
- if (HlogData.nGroupSize != 1)
|
||||
+ if (HlogData->nGroupSize != 1)
|
||||
{
|
||||
nErrCode = DSL_DRV_DANUBE_G997_DeltValuesSpread(
|
||||
- 0x1, HlogData.nGroupSize, HlogData.deltHlog.nNumData,
|
||||
- HlogData.deltHlog.nNSCData, pData->deltHlog.nNSCData);
|
||||
+ 0x1, HlogData->nGroupSize, HlogData->deltHlog.nNumData,
|
||||
+ HlogData->deltHlog.nNSCData, pData->deltHlog.nNSCData);
|
||||
|
||||
if (nErrCode == DSL_SUCCESS)
|
||||
{
|
||||
pData->deltHlog.nNumData =
|
||||
- (DSL_uint16_t)(HlogData.deltHlog.nNumData * HlogData.nGroupSize);
|
||||
+ (DSL_uint16_t)(HlogData->deltHlog.nNumData * HlogData->nGroupSize);
|
||||
pData->nGroupSize = 1;
|
||||
- pData->nMeasurementTime = HlogData.nMeasurementTime;
|
||||
+ pData->nMeasurementTime = HlogData->nMeasurementTime;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No spread needed, copy data*/
|
||||
- memcpy(pData, &HlogData, sizeof(DSL_G997_DeltHlogData_t));
|
||||
+ memcpy(pData, HlogData, sizeof(DSL_G997_DeltHlogData_t));
|
||||
}
|
||||
+
|
||||
+ kfree(HlogData);
|
||||
}
|
||||
else
|
||||
{
|
||||
Reference in New Issue
Block a user