The suit alleged Walmart “violated the Controlled Substances Act by filling thousands of invalid prescriptions."