It really depends...if you called an all in on the river with that board...you should have laid it down.....If you called an all in on the flop, you were correct in doing so.....I'm guessing you didn't bet him out of the pot.....that was the only mistake if there was one