]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita0ebd9bfc0b3fc65168bead3efabb47c1c3d1e4e
treea9f49dd97437cb129801cf1883d7daf7c829a614
parent04927dc6c4553fcb66509e56bf51a8f5e9095bc7
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