Give the devil his due

To give credit to someone who deserves it even if you dislike him or her.

I do not like to work with my coworker because he is lazy. However, you have to give the devil his due. He usually gets the job done.