The Messenger of Allah ﷺ said, "Whoever keeps a dog, except for a hunting dog or a livestock dog, two qirats are deducted from his deeds each day."
حدثنا وكيع
قال رسول الله ﷺ من اقتنى كلبا إلا كلب ضار أو كلب ماشية نقص من عمله كل يوم قيراطان
Its chain is sahih. It is a repetition of 5171."A trained hunting dog" is the reading established in Ha and Mim, making it an instance of attaching the adjective to the noun it describes. In a copy found in the margin of Mim, it reads, "except a hunting dog," and in Kaf it reads, "except a trained hunting dog."