The below verses are self explanatory.
That old man Ajāmila had ten sons, of whom the youngest was a baby
named Nārāyaṇa. Since Nārāyaṇa was the youngest of all the sons, he
was naturally very dear to both his father and his mother. Because of
the child’s broken language and awkward movements, old Ajāmila was
very much attached to him. He always took care of the child and
enjoyed the child’s activities. When Ajāmila chewed food and ate it,
he called the child to chew and eat, and when he drank he called the
child to drink also. Always engaged in taking care of the child and
calling his name, Nārāyaṇa, Ajāmila could not understand that his
own time was now exhausted and that death was upon him. When the time
of death arrived for the foolish Ajāmila, he began thinking
exclusively of his son Nārāyaṇa. When he saw them he was extremely
bewildered, and because of attachment to his child, who was playing a
short distance away, Ajāmila began to call him loudly by his name.
Thus with tears in his eyes he somehow or other chanted the holy
name of Nārāyaṇa.(SB 6.1.24-28)
My dear King, the order carriers of Viṣṇu, the Viṣṇudūtas,
immediately arrived when they heard the holy name of their master from
the mouth of the dying Ajāmila, who had certainly chanted without
offense because he had chanted in complete anxiety.(SB 6.1.30)
The Viṣṇudūtas continued: Even previously, while eating and at other
times, this Ajāmila would call his son, saying, “My dear Nārāyaṇa,
please come here.” Although calling the name of his son, he
nevertheless uttered the four syllables nā-rā-ya-ṇa. Simply by
chanting the name of Nārāyaṇa in this way, he sufficiently atoned
for the sinful reactions of millions of lives.Simply by chanting the
holy name of Lord Viṣṇu, such sinful persons may attract the
attention of the Supreme Lord, who therefore considers, “Because this
man has chanted My holy name, My duty is to give him protection.”
(SB 6.2.8-9)