samples: drivers: dac: src: add error check of dac_write_value()
samples: drivers: dac: src: add error check of dac_write_value()

Validate that dac_write_value() succeeds.

Fixes #30205

Signed-off-by: Xinrong Han <8cf10d2fd3fc5994e51fd1b9060fd09f27e059cf@mails.tsinghua.edu.cn>

finikorg/zephyr,Vudentz/zephyr,nashif/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,nashif/zephyr,nashif/zephyr,finikorg/zephyr,nashif/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,Vudentz/zephyr,galak/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr