debug: i830_valid_command: Return invalid for subopcodes with no name
diff mbox

Message ID 1249064591-16236-1-git-send-email-cworth@cworth.org
State Not Applicable
Headers show

Commit Message

Carl Worth July 31, 2009, 6:23 p.m. UTC
Previously the code would always return the count, before ever looking
into the _3d_cmds table to see if there was actually a valid command.

Thanks to Alan Coopersmith who reported that the code was confusing
parfait:

https://bugs.freedesktop.org/show_bug.cgi?id=21666
---
 src/i830_debug.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Patch
diff mbox

diff --git a/src/i830_debug.c b/src/i830_debug.c
index 1126c26..4b704a1 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -2094,8 +2094,6 @@  i830_valid_command (uint32_t cmd)
 	    count = 1;
 	else
 	    count = (cmd & 0xff) + 2;
-	if (pipeline_type <= 3)
-	    return count;
 	if (!_3d_cmds[pipeline_type][opcode][subopcode].name)
 	    return -1;
 	break;