Yōga Sūtra 2.12
क्लेशमूलः कर्माशयो दृष्टादृष्टजन्मवेदनीयः।
klēśamūlaḥ karmāśayō dr̥ṣṭādr̥ṣṭajanmavēdanīyaḥ।
[क्लेश मूलः कर्म आशयो दृष्ट अदृष्ट जन्म वेदनीयः।
klēśa = the obstacles; mūlaḥ = are rooted; karma = in actions performed; āśayō = with expectation; dr̥ṣṭa = consciously; adr̥ṣṭa = or unconsciously; janma = in births; vēdanīyaḥ = must be experienced with pain;]
The obstacles are rooted in actions performed with expectation, consciously or unconsciously in various births, and must be experienced with pain.
Once the actions are performed with expectation its results must be experienced. It does not matter if the actions were performed consciously or unconsciously. For Yōgi these results of actions, whether they are pleasure or sorrow, is a pain to be experienced in material world as his goal is set on Kaivalya. Hence the mindset to experience with equanimity both pleasure and misery is advocated.