Build fix: use ret directly in error handling path

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>