diff --git a/support/platform/src/pcie/pcie_dispatch.c b/support/platform/src/pcie/pcie_dispatch.c index 5d9db1ac..d4a5bb65 100644 --- a/support/platform/src/pcie/pcie_dispatch.c +++ b/support/platform/src/pcie/pcie_dispatch.c @@ -52,15 +52,15 @@ static int32_t PcieCmdRead(struct PcieCntlr *cntlr, struct HdfSBuf *data, struct ret = PcieCntlrRead(cntlr, pos, buf, len); if (ret != HDF_SUCCESS) { HDF_LOGE("PcieCntlrRead: error, ret is %d", ret); - goto EXIST; + goto EXIT; } if (!HdfSbufWriteBuffer(reply, buf, len)) { HDF_LOGE("PcieCntlrRead: sbuf write buffer failed"); ret = HDF_ERR_IO; - goto EXIST; + goto EXIT; } ret = HDF_SUCCESS; -EXIST: +EXIT: OsalMemFree(buf); return ret; } diff --git a/support/platform/src/pcie/pcie_if.c b/support/platform/src/pcie/pcie_if.c index 79bb5c1a..98f5dfd5 100644 --- a/support/platform/src/pcie/pcie_if.c +++ b/support/platform/src/pcie/pcie_if.c @@ -72,24 +72,24 @@ static int32_t PcieUserRead(DevHandle handle, uint32_t pos, uint8_t *data, uint3 if (buf == NULL) { HDF_LOGE("PcieUserRead: failed to obtain buf"); ret = HDF_ERR_MALLOC_FAIL; - goto __EXIT; + goto EXIT; } if (!HdfSbufWriteUint32(buf, len)) { HDF_LOGE("PcieUserRead: sbuf write uint32 failed"); ret = HDF_ERR_IO; - goto __EXIT; + goto EXIT; } if (!HdfSbufWriteUint32(buf, pos)) { HDF_LOGE("PcieUserRead: sbuf write uint32 failed"); ret = HDF_ERR_IO; - goto __EXIT; + goto EXIT; } reply = HdfSBufObtainDefaultSize(); if (reply == NULL) { HDF_LOGE("PcieUserRead: failed to obtain reply"); ret = HDF_ERR_MALLOC_FAIL; - goto __EXIT; + goto EXIT; } ret = service->dispatcher->Dispatch(&service->object, PCIE_CMD_READ, buf, reply); @@ -99,7 +99,7 @@ static int32_t PcieUserRead(DevHandle handle, uint32_t pos, uint8_t *data, uint3 ret = PcieGetDataFromReply(reply, data, len); } -__EXIT : +EXIT : if (reply != NULL) { HdfSBufRecycle(reply); }