diff mbox series

[10/10] udmabuf: use ENOTTY for invalid ioctls

Message ID 20180911065921.23818-11-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series udmabuf: misc fixes. | expand

Commit Message

Gerd Hoffmann Sept. 11, 2018, 6:59 a.m. UTC
Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/dma-buf/udmabuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart Sept. 11, 2018, 9:43 a.m. UTC | #1
Hi Gerd,

Thank you for the patch.

On Tuesday, 11 September 2018 09:59:21 EEST Gerd Hoffmann wrote:
> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/dma-buf/udmabuf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
> index 1862bb6bed..a543fd6ea1 100644
> --- a/drivers/dma-buf/udmabuf.c
> +++ b/drivers/dma-buf/udmabuf.c
> @@ -260,7 +260,7 @@ static long udmabuf_ioctl(struct file *filp, unsigned
> int ioctl, ret = udmabuf_ioctl_create_list(filp, arg);
>  		break;
>  	default:
> -		ret = -EINVAL;
> +		ret = -ENOTTY;
>  		break;
>  	}
>  	return ret;
diff mbox series

Patch

diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 1862bb6bed..a543fd6ea1 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -260,7 +260,7 @@  static long udmabuf_ioctl(struct file *filp, unsigned int ioctl,
 		ret = udmabuf_ioctl_create_list(filp, arg);
 		break;
 	default:
-		ret = -EINVAL;
+		ret = -ENOTTY;
 		break;
 	}
 	return ret;