if (eError != PVRSRV_OK) {
PVR_DPF(PVR_DBG_ERROR, "PVRSRVOpenBCDeviceKM: "
"Failed to open external BC device");
- return eError;
+ goto err1;
}
eError =
if (eError != PVRSRV_OK) {
PVR_DPF(PVR_DBG_ERROR,
"PVRSRVOpenBCDeviceKM : Failed to get BC Info");
- return eError;
+ goto err2;
}
psBCInfo->ui32BufferCount = sBufferInfo.ui32BufferCount;
if (eError != PVRSRV_OK) {
PVR_DPF(PVR_DBG_ERROR, "PVRSRVOpenBCDeviceKM: "
"Failed to allocate BC buffers");
- return eError;
+ goto err2;
}
OSMemSet(psBCInfo->psBuffer, 0,
sizeof(struct PVRSRV_BC_BUFFER) *
if (eError != PVRSRV_OK) {
PVR_DPF(PVR_DBG_ERROR, "PVRSRVOpenBCDeviceKM: "
"Failed sync info alloc");
- goto ErrorExit;
+ goto err3;
}
eError = psBCInfo->psFuncTable->pfnGetBCBuffer(
if (eError != PVRSRV_OK) {
PVR_DPF(PVR_DBG_ERROR, "PVRSRVOpenBCDeviceKM: "
"Failed to get BC buffers");
- goto ErrorExit;
+ goto err3;
}
psBCInfo->psBuffer[i].sDeviceClassBuffer.
return PVRSRV_OK;
-ErrorExit:
-
+err3:
for (i = 0; i < psBCInfo->ui32BufferCount; i++) {
if (psBCInfo->psBuffer[i].sDeviceClassBuffer.psKernelSyncInfo) {
PVRSRVFreeSyncInfoKM(psBCInfo->psBuffer[i].
sizeof(struct PVRSRV_BC_BUFFER), psBCInfo->psBuffer,
NULL);
}
-
+err2:
+err1:
return eError;
}