From: Imre Deak Date: Thu, 14 Oct 2010 12:00:04 +0000 (+0300) Subject: gpu: pvr: fix typo in SGXDoKickBW X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07cfe2700ce1a72fbc1d7f19179094ff3a5b2f66;p=sgx.git gpu: pvr: fix typo in SGXDoKickBW This leads to the IOCTL failing in case the new structure format is used with it. Also fixes bounds checking for the old format. Signed-off-by: Imre Deak --- diff --git a/pvr/bridged_sgx_bridge.c b/pvr/bridged_sgx_bridge.c index ff80932..30b7a73 100644 --- a/pvr/bridged_sgx_bridge.c +++ b/pvr/bridged_sgx_bridge.c @@ -166,7 +166,7 @@ int SGXDoKickBW(u32 ui32BridgeID, PVRSRV_BRIDGE_ASSERT_CMD(ui32BridgeID, PVRSRV_BRIDGE_SGX_DOKICK); max_3dstat_vals = SGX_MAX_3D_STATUS_VALS; - if (unlikely(in_size) != sizeof(*psDoKickIN)) { + if (unlikely(in_size != sizeof(*psDoKickIN))) { max_3dstat_vals = SGX_MAX_3D_STATUS_VALS_OLD; if (kick_compat_conv(psDoKickIN, in_size) != 0) { psRetOUT->eError = PVRSRV_ERROR_INVALID_PARAMS; @@ -254,7 +254,7 @@ int SGXDoKickBW(u32 ui32BridgeID, return 0; } - if (psDoKickIN->sCCBKick.ui32Num3DStatusVals > SGX_MAX_3D_STATUS_VALS) { + if (psDoKickIN->sCCBKick.ui32Num3DStatusVals > max_3dstat_vals) { psRetOUT->eError = PVRSRV_ERROR_INVALID_PARAMS; return 0; }