Should a man wish to adorn himself with the ornaments of the earth, to wear its apparels, or partake of the benefits it can bestow, no harm can befall him, if he alloweth nothing whatever to intervene between him and God, for God hath ordained every good thing, whether created in the heavens or in the earth, for such of His servants as truly believe in Him.
Definition of attachment.
Also, if your actions are due to addiction but you're consciously trying to counter it (or even, if you don't have help in quitting, just disliking it), perhaps that's different from allowing something to "intervene between him and God".