Reported by coverity scan.
v2: fix second case
Note: This is a candidate for stable branches.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
e85c9a4d2874a302195c66742b446f0645440c43)
ir_validate::visit_leave(ir_loop *ir)
{
if (ir->counter != NULL) {
- if ((ir->from == NULL) || (ir->from == NULL) || (ir->increment == NULL)) {
+ if ((ir->from == NULL) || (ir->to == NULL) || (ir->increment == NULL)) {
printf("ir_loop has invalid loop controls:\n"
" counter: %p\n"
" from: %p\n"
abort();
}
} else {
- if ((ir->from != NULL) || (ir->from != NULL) || (ir->increment != NULL)) {
+ if ((ir->from != NULL) || (ir->to != NULL) || (ir->increment != NULL)) {
printf("ir_loop has invalid loop controls:\n"
" counter: %p\n"
" from: %p\n"