No it's not. My baby had flue and cough when he was one month old and i was so stressed because i was told not to give him anything.I kept breastfeeding him and within a week it was gone.
If you are breastfeeding ,all i can tell you is keep or breastfeeding your baby. Breast milk contains antibodies that can help your child fight the illness that is causing the cough.
Hope this is help.