You commit no error by entering uninhabited homes wherein there is something that belongs to you. God knows everything you reveal, and everything you conceal.
لَيسَ عَلَيكُم جُناحٌ أَن تَدخُلوا بُيوتًا غَيرَ مَسكونَةٍ فيها مَتٰعٌ لَكُم وَاللَّهُ يَعلَمُ ما تُبدونَ وَما تَكتُمونَ
laisa ‘alaikum junaahun ann tadkhuloo buyootan ghaira maskoonatin feeha mataa’ul lakum; wallaahu ya’lamu maa tubdoona wa maa taktumoon