Adam Sandler‘s been walking around with a cane, and while it might look kinda swaggy, it’s not for show — it’s part of his recovery from going under the knife a few weeks back.

We got photos of Adam out this past weekend in L.A.’s Pacific Palisades neighborhood with the cane in his right hand for support … while he shopped with his wife, Jackie.

Sources with direct knowledge tell TMZ … Adam’s been using the cane because of a recent hip surgery he had around Labor Day.

We’re told this wasn’t due to a sudden injury, or any medical emergency — Adam specifically scheduled the surgery to land between projects. Fans can rest easy … we’re told the Sandman will be all healed and ready to go for his upcoming comedy tour, which begins in late October.

Adam had been seen walking around town with a cane for a few weeks, but he hadn’t said anything about why he needed it.

Our sources say the surgery was a success, and Adam — who famously loves his pickup basketball games — is already looking forward to getting on a court in the near future.

Get better soon, Adam!!!