As a TA, what should I do about an error in the professor's lecture that I repeated in the lecture notes? Here is the somewhat awkward situation.

I am a TA for a class that I have never taken before.  The professor (probably) knows this, but I don't think the students have caught on, since it is a lower-division class and as a graduate student I have significantly more mathematical maturity than most of them.

As a TA, I am responsible for preparing the lecture notes for the class.  A different TA is responsible for grading assignments.

A few weeks ago, the professor made a (small) mistake in his lecture, and I transcribed the error onto the lecture notes without realizing it was a mistake.

Recently we had a midterm, and the other TA noticed that a lot of the students were making the same mistake.  The other TA recognized it was wrong and is now docking points for the error, even though I told him there was a mistake in the lecture notes.

What should I do?  I think the students will be mad when they hear about this, and if I tell the professor, he might get mad at me for preparing bad lecture notes.

Edit: It was the kind of error that would be confusing after the lecture, but hard to spot during the lecture.  Basically he used a matrix where he should have used the matrix's transpose.  And in the example problem he solved on the board, the matrix was a diagonal matrix, so it made no difference.  But the matrix on the midterm wasn't.
Just tell the professor: "The transcription of the lecture included an error, and many students made the same error on the midterm." (It really doesn't matter whether the mistake was made first in the lecture or the notes.)

He will decide what to do about the midterm.

He will almost certainly be very happy to hear about his error from you, rather than from a large number of irate students (which is likely to happen if you don't tell him).

Nobody is infallible - not professors, not teaching assistants, not students. If he gets mad at you for preparing "bad lecture notes" for proliferating one mistake that he made, he is completely unreasonable.

As an aside: this evening, I gave my students a quiz, and during the quiz my TA - who was helping me proctor - pointed out an error. I thanked him and told the students to disregard that question.  Then, after the quiz, I had the students get together in groups and work on "fixing" the question (the nature of the error made the fix non-trivial). It was an interesting and helpful educational exercise, for my students and for me. Errors can sometimes be an opportunity for good things.

Of course, I told my students that this is an important lesson on the dangers of taking code snippets off the Internet or from a book without carefully checking them :)