The caller already has done such a check.
And it was wrong anyway, it had to be '>=' rather than '>'
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
LKML-Reference: <
20100508112717.
130386882@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
        unsigned int esel;
        u64 config;
 
-       if (hw_event > ARRAY_SIZE(p4_general_events)) {
-               printk_once(KERN_ERR "P4 PMU: Bad index: %i\n", hw_event);
-               return 0;
-       }
-
        config = p4_general_events[hw_event];
        bind = p4_config_get_bind(config);
        esel = P4_OPCODE_ESEL(bind->opcode);