From: Imre Deak Date: Tue, 29 Mar 2011 17:26:54 +0000 (+0300) Subject: gpu: pvr: fix PVRSRVWrapExtMemoryKM for user provided physical pages X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0eafc6b010fbbd2796e0b96d8ac9bb7f716164ca;p=sgx.git gpu: pvr: fix PVRSRVWrapExtMemoryKM for user provided physical pages Reported-by: Coverity Signed-off-by: Imre Deak Reviewed-by: Pauli Nieminen --- diff --git a/pvr/devicemem.c b/pvr/devicemem.c index 881cf24..eb57ea3 100644 --- a/pvr/devicemem.c +++ b/pvr/devicemem.c @@ -713,7 +713,7 @@ enum PVRSRV_ERROR PVRSRVWrapExtMemoryKM(void *hDevCookie, psDeviceNode = (struct PVRSRV_DEVICE_NODE *)hDevCookie; PVR_ASSERT(psDeviceNode != NULL); - if (psDeviceNode == NULL) { + if (!psDeviceNode || (!pvLinAddr && !psExtSysPAddr)) { PVR_DPF(PVR_DBG_ERROR, "PVRSRVWrapExtMemoryKM: invalid parameter"); return PVRSRV_ERROR_INVALID_PARAMS;