From 519f4ed0a09cdf3834c5cbde1416acd9a979a709 Mon Sep 17 00:00:00 2001 From: Oded Gabbay Date: Sun, 19 Dec 2021 16:06:59 +0200 Subject: habanalabs: replace some -ENOTTY with -EINVAL -ENOTTY is returned in case of error in the ioctl arguments themselves, such as function that doesn't exists. In all other cases, where the error is in the arguments of the custom data structures that we define that are passed in the various ioctls, we need to return -EINVAL. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/command_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/misc/habanalabs/common/command_buffer.c') diff --git a/drivers/misc/habanalabs/common/command_buffer.c b/drivers/misc/habanalabs/common/command_buffer.c index d4eb9fb9ea12..e7534b5129fa 100644 --- a/drivers/misc/habanalabs/common/command_buffer.c +++ b/drivers/misc/habanalabs/common/command_buffer.c @@ -475,7 +475,7 @@ int hl_cb_ioctl(struct hl_fpriv *hpriv, void *data) break; default: - rc = -ENOTTY; + rc = -EINVAL; break; } -- cgit v1.2.3