I remember reading a study on learning efficiency done with piano students. I can't find it for the moment, but one important thing has stuck in my memory: the pianists who learnt the fastest and made the least mistakes in performance were not those who while practicing repeated a phrase the greatest number of times correctly, they were the ones who played it the least number of times incorrectly.
Let's say that when you play a certain passage, you get it right on average 3 times out of 4. If you keep repeating the passage enough times, at some point (simply by the rules of probability) you will have a run of 10 consecutive correct play-throughs. This doesn't mean that you have actually improved your accuracy in this passage.
How do you minimise the number of faulty play-throughs? Here's how I think it should go:
You play through a passage once. If you made no mistakes, it felt comfortable and sounded as you wanted it to, maybe play it a second time to make sure (or even just for the pleasure!) and then go on to the next passage.
If you did play a wrong note, or hit a chord much too loud or too soft, or even if you just felt uncomfortable at some point, look carefully at the spot where it happened. Try to find out why it happened. Were you too tense? Did you use the wrong fingering? Or do you need to actually change your fingering at this point? Or was it a leap that you misjudged? Or was it just a lapse in concentration?
Go back to this one spot (probably just a few notes) and play it really slowly. See if you can make it feel smooth and comfortable, without any mistakes, at a slow speed. Play just this spot, two or three times, slowly, beautifully and with the utmost concentration.
Once you have done this, play the whole passage much slower than you did before. If it goes well, play it through again, just as slowly. Was it still ok? Try it a bit faster, but still slower than before.
Did that go well? Now here's the hard bit. Don't try to play it back up to speed yet! Maybe play it once more slowly, being careful to keep at a speed where you are sure to stay completely accurate. Then go on to the next passage, or something else entirely. This takes willpower, but in the long term it will pay.
After you have worked on something else, come back to the passage where the mistake(s) occurred. First play it slowly. Is it good? Play it again, just as slowly, to make sure. Now see if you can play it slightly faster. It still doesn't need to be at full speed. If it goes well, fine: you don't need to repeat it. You can come back to it again later. If you made the same mistake, or another one, it means that more slow practice, in smaller chunks, is called for.