xml: Properly handle errors in create_channel
xml: Properly handle errors in create_channel

It would previously ignore some errors (strdup failing), and ignore the
return value of setup_scan_element.

Signed-off-by: Paul Cercueil <a027184a55211cd23e3f3094f1fdc728df5e0500@crapouillou.net>

analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio