If it is reporting an incorrect altitude it is probably the encoder that is at fault. This may or may not be part of the transponder unit itself.
The more modern mode S offerings from Garmin and others display the altitude being reported on the transponder which is a useful check.