Play video content EXCLUSIVE TMZSports.com

Donald Trump's absolutely doing the right thing by trying to bail out LiAngelo Ball and his UCLA teammates after their shoplifting arrest in China -- so says Kenyon Martin.

"That's his obligation. That's his responsibility," K-Mart told TMZ Sports ... when we asked him about POTUS hitting up Chinese President Xi Jinping to resolve the situation.

The ex-NBA star says LiAngelo and his bros are only guilty of being young and dumb ... and "shouldn't be punished" for that. Not by China, at least.

Kenyon says he fully expects UCLA to drop the hammer -- and that should be enough.