Validate that sensor_sample_fetch() and sensor_channel_get() are on success. Fixes #29945 Signed-off-by: Xinrong Han <hanxr19@mails.tsinghua.edu.cn>