From: Janusz Sobczak Date: Mon, 9 Aug 2010 11:23:36 +0000 (+0200) Subject: gpu: pvr: Check SysAcquireData return value. X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=099c91f6aafead97d4a3c61d5eda9f29290201fc;p=sgx.git gpu: pvr: Check SysAcquireData return value. SysAcquireData() could theoretically fail. This patch adds missing return value check in SGXReadDiffCountersKM(). Signed-off-by: Janusz Sobczak Signed-off-by: Imre Deak --- diff --git a/pvr/sgxinit.c b/pvr/sgxinit.c index 10dbc5a..39c3cf9 100644 --- a/pvr/sgxinit.c +++ b/pvr/sgxinit.c @@ -1531,7 +1531,8 @@ enum PVRSRV_ERROR SGXReadDiffCountersKM(void *hDevHandle, u32 ui32Reg, psDevInfo->ui32HWGroupRequested = ui32New; psDevInfo->ui32HWReset |= ui32NewReset; - SysAcquireData(&psSysData); + if (SysAcquireData(&psSysData) != PVRSRV_OK) + return PVRSRV_ERROR_GENERIC; psPowerDevice = psSysData->psPowerDeviceList; while (psPowerDevice) {