"عَنِ ابْنِ مَسْعُودٍ قَالَ: لَوْ أَنَّ أَهْلَ العِلْمِ صَانوا العِلْمَ وَوَضَعُوهُ عِنْدَ أَهْلِهِ لَسَادُوا أَهْلَ زَمَانِهِمْ وَلكِنَّهُمْ وَضَعُوهُ عِنْدَ أَهْلِ الدُّنْيَا لِيَنَالُوا مِنْ دُنْيَاهُمْ فَهَانُوا عَلَيْهِمْ، سَمِعْتُ نَبِيَّكُمْ ﷺ يَقُولُ: مَنْ جَعَلَ الهُمُومَ هَمًّا وَاحِدًا - هَمَّ المَعَادِ كَفَاهُ اللهُ سَائِرَ هُمُومِهِ، وَمَنْ تَشَعَّبَتْ بِهِ الهُمُومُ مِنْ أَحْوالِ الدُّنْيَا لَمْ يُبَالِ اللهُ فِى أَيَّ أوْدِيتهَا هَلَكَ".
"If the people of knowledge had taken care of it and presented it only to those who cared for it, they would have become the leaders of their age by virtue of that. But they squandered it on the people of wealth and status in this world in order to gain some worldly benefit, so the people of wealth and status began to look down on them. I heard your Prophet say: 'Whoever focuses all his concerns on one issue, the concerns of the Hereafter, Allah will suffice him and spare him the worries of this world. But whoever wanders off in concern over different worldly issues, Allah will not care in which of these valleys he is destroyed.'" (Da'if) Another chain with similar wording.
أَنَّ أَهْلَ الْعِلْمِ صَانُوا الْعِلْمَ وَوَضَعُوهُ عِنْدَ أَهْلِهِ لَسَادُوا بِهِ أَهْلَ زَمَانِهِمْ وَلَكِنَّهُمْ بَذَلُوهُ لأَهْلِ الدُّنْيَا لِيَنَالُوا بِهِ مِنْ دُنْيَاهُمْ فَهَانُوا عَلَيْهِمْ سَمِعْتُ نَبِيَّكُمْ ﷺ يَقُولُ مَنْ جَعَلَ الْهُمُومَ هَمًّا وَاحِدًا هَمَّ آخِرَتِهِ كَفَاهُ اللَّهُ هَمَّ دُنْيَاهُ وَمَنْ تَشَعَّبَتْ بِهِ الْهُمُومُ فِي أَحْوَالِ الدُّنْيَا لَمْ يُبَالِ اللَّهُ فِي أَىِّ أَوْدِيَتِهَا هَلَكَ قَالَ أَبُو الْحَسَنِ حَدَّثَنَا خَازِمُ بْنُ يَحْيَى حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ وَمُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ قَالاَ حَدَّثَنَا ابْنُ نُمَيْرٍ عَنْ مُعَاوِيَةَ النَّصْرِيِّ وَكَانَ ثِقَةً ثُمَّ ذَكَرَ الْحَدِيثَ نَحْوَهُ بِإِسْنَادِهِ
“I heard your Prophet ﷺ say: ‘Whoever focuses all his concerns on one thing, the Hereafter, Allah will relieve him of worldly concerns, but whoever has disparate concerns scattered among a number of worldly issues, Allah will not care in which of its valleys he died.’”
سَمِعْتُ نَبِيَّكُمْ ﷺ يَقُولُ مَنْ جَعَلَ الْهُمُومَ هَمًّا وَاحِدًا هَمَّ الْمَعَادِ كَفَاهُ اللَّهُ هَمَّ دُنْيَاهُ وَمَنْ تَشَعَّبَتْ بِهِ الْهُمُومُ فِي أَحْوَالِ الدُّنْيَا لَمْ يُبَالِ اللَّهُ فِي أَىِّ أَوْدِيَتِهِ هَلَكَ
[Machine] The people of knowledge protected their knowledge and placed it with their own people, in order to benefit the people of their time. However, the people of this world came and belittled them. I heard your Prophet ﷺ say, "Whoever made his worries one single concern, Allah will suffice him in all his worries. And whoever became preoccupied with worries unrelated to the affairs of this world, Allah will not care in which valleys he perishes."
أَنَّ أَهْلَ الْعِلْمِ صَانُوا عِلْمَهُمْ وَوَضَعُوهُ عِنْدَ أَهْلِهِ لَسَادُوا بِهِ أَهْلَ زَمَانِهِمْ وَلَكِنَّهُمْ أَتَوْا بِهِ أَهْلَ الدُّنْيَا؛ فَاسْتَخَفُّوا بِهِمْ سَمِعْتُ نَبِيَّكُمْ ﷺ يَقُولُ «مَنْ جَعَلَ هُمُومَهُ هَمًّا وَاحِدًا كَفَاهُ اللَّهُ ﷻ سَائِرَ هُمُومِهِ وَمَنْ تَشَعَّبَتْ بِهِ الْهُمُومُ دُونَ أَحْوَالِ الدُّنْيَا لَمْ يُبَالِ اللَّهُ ﷻ فِي أَيِّ أَوْدِيَتِهِ هَلَكَ»
"مَنْ جَعَلَ الْهُمُومَ هَمًّا وَاحِدًا هَمَّ المعَادِ، كَفَاهُ اللهُ سَائِر هُمُومِهِ، وَمَنْ تَشَعَّبَتْ بِهِ الْهُمُومُ مِنْ أَحْوَالِ الدُّنْيَا لَمْ يُبَال اللهُ فِي أَيِّ أَودِيَتِها هَلَكَ".