I do it in the inventory screen. As soon as I notice it is locked going up or down I simply pull or push the right stick in the opposite direction.
Mine seems to always lock going up, so I can't scroll down the inventory. I pull the right stick down as soon as I notice it, while in the inventory menus, and it has always fixed it.