Character mistake: When Ellerby tells Sullivan "Some people don't trust a guy with an immaculate record. I do. I have an immaculate record." Really? An immaculate record even after you punch they guy's lights out for not installing the cameras right? He's a captain, had a long career, if he punches a guy for that, certainly he's had other complaints before too.
Continuity mistake: At the very last shot of the movie, taken from inside Sullivan's apartment, the Massachusetts State House appears to be quite closer than in other shots from the apartment - e.g. when Sullivan first rents it.
Continuity mistake: When Frank asks for "numbers", Madolyn is moving into the apartment. In the next scene, when Costigan and Madolyn "get together" she is shown as moving out, but it seems that Costigan was giving his numbers then leaving the hideout to go get with Madolyn.
Factual error: When Costigan takes the Dr. Smith-prescribed Oxycontin tablets, the tablets are incorrectly shown as large, white oblong pills with the prescription bottle just labeled 'Oxycontin'. In reality oxycontin tablets are small, round, various colored pills (dependent on mg dose) with the dosage number (in mg) imprinted on one side of the tablet as 10, 15, 20, 30, 40, 60, 80, and 160 (I believe 160 mg tabs are discontinued) and the opposite side imprinted as OC or OP. Also, the dose (in mg) would have been printed on the front bottle label.
Factual error: When Costello throws the cocaine powder and says "Want some coke? Don't stop till you're numb" the pupils in his eyes are constricted. Cocaine, being a stimulant, dilates your pupils. Constricted pupils occurs with opiates - narcotic analgesic.