OSDN Git Service

habanalabs: replace some -ENOTTY with -EINVAL
authorOded Gabbay <ogabbay@kernel.org>
Sun, 19 Dec 2021 14:06:59 +0000 (16:06 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:10 +0000 (08:59 +0200)
commit519f4ed0a09cdf3834c5cbde1416acd9a979a709
treea9f49dd97437cb129801cf1883d7daf7c829a614
parent0a63ac769b4cb79dfe68efd06528e9174fb88162
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 <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_buffer.c
drivers/misc/habanalabs/common/habanalabs_ioctl.c
drivers/misc/habanalabs/common/memory.c