My laptop is 6 year-old (Hp pavillion zt3019ea) and for few weeks now, has started to make this high pitched noise (like a mosquito!) only when connected to the charger.
I replaced the charger with a new one.Same thing. Then that new charger (8 days-old) died yesterday.
I thought I needed to get a new battery but at the same time is it really worth it for a 6 year-old laptop? (the hard drive has been replaced in March)
Over time the electronics in all equipment start to break down due to usage.
Capacitors leaking or on there way out make a high pitched noise, and transformers get louder also with age.
It should be ok to use but one day the componets will fail.
But it should be ok to use.
Bar the noise it creates.