All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is nothing wrong with naming the newborn child with the same name as his father’s, whether the father is alive or dead, and whether one named the child after him because it is his father’s name or for some other considerations.
The basic principle about this is that it is permissible and it cannot be prohibited except with evidence.
What is important is that the name in itself should be something that it is permissible to be named with and not something that is forbidden like the names that suggest being a slave to other than Allah.
For more benefit on naming children with good names, please refer to Fatawa 82724, 87262, 88553 and 87596.
Allah Knows best.