When you buy a computer or a PC peripheral, you should always ask the warranty that they give. Not all computers and their parts are sure to be functioning properly and to avoid the troubles of being robbed, warranties are the best way to be safe and secure.
There will also be areas to be covered such as the manner to which these parts were damaged. Some are damaged goods from the very first day that you bought them while others would operate fine for the first couple of weeks and then bog down. Normally, a warranty of 1 to 3 years is given and it is in these cases that you should make sure that warranty stickers and the actual receipt as proof of purchase should not be thrown away.
Rest assured, the store where you bought such peripherals will be more than happy to replace them. There are defective parts and while actual manufacturers try to control them, you can just imagine how hard it would be to cover over a million parts in production at the same time. There will always be some that would get away and the probability of getting them is really far fetched.
However, that minor probability may unfortunately land in your fingertips. As long as the PC part or computer peripheral does not encounter damage due to your negligence, you have nothing to worry about. Just bring it back to the store and expect a replacement in no time.