summaryrefslogtreecommitdiffstats
path: root/driver/ioctl.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-11-20 14:24:17 +0100
committerSuren A. Chilingaryan <csa@suren.me>2015-11-20 14:24:17 +0100
commitcc5107c6d3db46ba213db974c630fc0fa1b89d68 (patch)
tree6c16375da1d5c7c5d4d853c5e0ba7775bbc99c8a /driver/ioctl.c
parent517ecf828e60e1e364c3ab6e67c2acd8a3c1b0c1 (diff)
downloadpcitool-cc5107c6d3db46ba213db974c630fc0fa1b89d68.tar.gz
pcitool-cc5107c6d3db46ba213db974c630fc0fa1b89d68.tar.bz2
pcitool-cc5107c6d3db46ba213db974c630fc0fa1b89d68.tar.xz
pcitool-cc5107c6d3db46ba213db974c630fc0fa1b89d68.zip
Configure number of DMA buffers in IPEDMA and improve checking and reporting inconsistent kmem buffers while re-using
Diffstat (limited to 'driver/ioctl.c')
-rw-r--r--driver/ioctl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/driver/ioctl.c b/driver/ioctl.c
index 0814fc8..26618c0 100644
--- a/driver/ioctl.c
+++ b/driver/ioctl.c
@@ -181,15 +181,13 @@ static int ioctl_pci_info(pcidriver_privdata_t *privdata, unsigned long arg)
*/
static int ioctl_kmem_alloc(pcidriver_privdata_t *privdata, unsigned long arg)
{
- int ret;
- READ_FROM_USER(kmem_handle_t, khandle);
-
- if ((ret = pcidriver_kmem_alloc(privdata, &khandle)) != 0)
- return ret;
+ int err, ret;
+ READ_FROM_USER(kmem_handle_t, khandle);
+ err = pcidriver_kmem_alloc(privdata, &khandle);
WRITE_TO_USER(kmem_handle_t, khandle);
- return 0;
+ return err;
}
/**