diff --git a/gasket_ioctl.c b/gasket_ioctl.c index 1b164ac..8cf094b 100644 --- a/gasket_ioctl.c +++ b/gasket_ioctl.c @@ -441,8 +441,10 @@ static int gasket_config_coherent_allocator( gasket_dev, ibuf.size, &ibuf.dma_address, ibuf.page_table_index); } + if (ret) + return ret; if (copy_to_user(argp, &ibuf, sizeof(ibuf))) return -EFAULT; - return ret; + return 0; }