backend: fix comparison of 'ret' pointer