Fix to return a negative error code from the error handling
case instead of 0, otherwise the error condition cann't be
reflected from the return value.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
max_nr_gframes = gnttab_max_grant_frames();
grant_frames = alloc_xen_mmio(PAGE_SIZE * max_nr_gframes);
- if (gnttab_setup_auto_xlat_frames(grant_frames))
+ ret = gnttab_setup_auto_xlat_frames(grant_frames);
+ if (ret)
goto out;
ret = gnttab_init();
if (ret)