Walmart has seen "a little bit" of customer-dissatisfaction after the retailer tightened gun and ammunition policies in response to two fatal shootings over the summer at its stores, according to CEO Doug McMillon.

"We think there needs to be change" in gun laws while also "protecting the rights of gun owners," McMillon said Tuesday in an interview from CNBC's Evolve Summit in Los Angeles awith "Squawk Box" co-host Becky Quick.

Back in September, Walmart announced it was discontinuing all sales of handguns as well as ammunition for handguns and ammunition for short-barrel rifles that can be used with military-style weapons. The nation's largest retailer also asked its customers to stop openly carrying firearms, in the 26 states where "open carry" is legal.

The moves came after a July shooting at a Walmart store in Mississippi, where two people were killed, and another one in August at a Walmart in El Paso, Texas, where 22 people were killed. Last week, the El Paso Walmart reopened with increased security.

McMillon, who said he grew up around guns and still owns them, believes he can see "all sides of this issue," though it's ultimately about safety.

In response, the National Rifle Association said, "Lines at Walmart will soon be replaced by lines at other retailers who are more supportive of America's fundamental freedoms."

Asked whether there's been customer blow-back, McMillon told CNBC on Tuesday, "A little bit. But no, not much. I think most people understand that we're not trying to make a political statement here. We're just trying to help create a safer environment."

On Monday, another deadly shooting happened outside of an Oklahoma Walmart. Authorities said a gunman killed two people and then himself in what appears to be a domestic dispute.

"It's tragic, this most recent event. It looks like a personal situation played out in our parking lot," McMillon said. "But El Paso really thrust us into a situation that we wouldn't have anticipated."

Following the summer shootings, Walmart faced backlash over what was perceived as a slow response to change its weapons policies.

McMillon, responding to that criticism, said Tuesday the company "took some time to think through what we needed to do."

"Our first focus was on caring for the associates that were impacted and the customers' families that were impacted and all the things related to that," he added. "It's a very divisive issue, obviously."