Can dependant travel with H4 visa from previous employer


I got a H4 Visa stamped in Apr 2014, from my spouse’s previous employer. I had travelled to USA using this , for couple of weeks. Post my travel back to India, my spouse shifted to a new job in USA and got his H1B petition transfer approved. I have the photocopy of the new I-797 with me.

I plan to travel back to USA now. Is it fine if i travel using the H4 Visa got from his previous employer.

Is it legal ? or are there chances that I am denied entry ?