From cc5107c6d3db46ba213db974c630fc0fa1b89d68 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 20 Nov 2015 14:24:17 +0100 Subject: Configure number of DMA buffers in IPEDMA and improve checking and reporting inconsistent kmem buffers while re-using --- driver/ioctl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'driver/ioctl.c') 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; } /** -- cgit v1.2.3