The Messenger of Allah ﷺ said, "Whoever comes to the mosque for something, that is his share of it."
قال رسول الله ﷺ: من أتى المسجد لشيء فهو حظه.
Abu Dawud (472) narrated it from Hisham bin Ammar, who said, Sadaqa bin Khalid told us, who said, Uthman bin Abu Atika Azdi told us, from Umayr bin Hani Ansi, from Abu Hurairah, and he mentioned it.Its chain is hasan due to Uthman bin Abu Atika, about whom there is disagreement. Ibn Main, Abu Mishar, and Nasai declared him daif, while Uthman Darimi said, "I heard Duhaym praising him and attributing truthfulness to him." Abu Hatim said, "There is no harm in him," and Ajli said, "There is no harm in him." Ibn Hibban mentioned him among the trustworthy narrators.What has become clear to me is that most of his narrations are from Ali bin Yazid Alhani, so the weakness comes through that route. When he narrates from someone other than him, he is reasonably reliable, and his hadith is recorded. This means that when he narrates from someone other than Ali bin Yazid Alhani, his hadith is hasan. As is the case here, for he narrated it from Umayr bin Hani Ansi, who is "trustworthy."