It's also a bit of an exaggeration to suggest he said City fans in any kind of numbers were racist. He was questioning why Mahrez isn't as popular as some other players (which is true), and suggested a number of reasons. One was that maybe some fans didn't "relate" to him as a North African Muslim.
He also said straight away "Of course, that will not be a factor for many".
I honestly don't see how controversial that is. After all, we've just had weeks of being told that everyone loves Jack Grealish, and one of the most common words used is "relatable". Mahrez, as a North African Muslim clearly isn't going to be getting drunk and partying, and his interviews aren't going to be as "relatable" to the typical City fan = whether that makes him less loved by some is probably a reasonable point.
You could argue that there was no need to raise the point, as it's obvious that plenty of fans would be racist, but only because plenty of society is racist. I'd probably give him the benefit of the doubt as Riyad is unusually marmite - strangely in my opinion given he's always been one of our more effective and exciting players to watch.