From: Todd Poynor Date: Sat, 21 Jul 2018 13:34:56 +0000 (-0700) Subject: staging: gasket: gasket_handle_ioctl fix ioctl exit trace param X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8fc1cb4cef287fd61391adcc48f4a6bdc369bf49;p=openwrt%2Fstaging%2Fblogic.git staging: gasket: gasket_handle_ioctl fix ioctl exit trace param Pass the return value from the device ioctl permissions callback to the tracepoint when the callback returns an error. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/gasket/gasket_ioctl.c b/drivers/staging/gasket/gasket_ioctl.c index dbe9fdef0c26..1b164ac7a049 100644 --- a/drivers/staging/gasket/gasket_ioctl.c +++ b/drivers/staging/gasket/gasket_ioctl.c @@ -65,7 +65,7 @@ long gasket_handle_ioctl(struct file *filp, uint cmd, void __user *argp) if (ioctl_permissions_cb) { retval = ioctl_permissions_cb(filp, cmd, argp); if (retval < 0) { - trace_gasket_ioctl_exit(-EPERM); + trace_gasket_ioctl_exit(retval); return retval; } else if (retval == 0) { trace_gasket_ioctl_exit(-EPERM);