Commit ec07eccc authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Greg Kroah-Hartman
Browse files

iio: core: return ENODEV if ioctl is unknown

[ Upstream commit af0670b0 ]

When the ioctl() mechanism was introduced in IIO core to centralize the
registration of all ioctls in one place via commit 8dedcc3e ("iio:
core: centralize ioctl() calls to the main chardev"), the return code was
changed from ENODEV to EINVAL, when the ioctl code isn't known.

This was done by accident.

This change reverts back to the old behavior, where if the ioctl() code
isn't known, ENODEV is returned (vs EINVAL).

This was brought into perspective by this patch:
  https://lore.kernel.org/linux-iio/20210428150815.136150-1-paul@crapouillou.net/



Fixes: 8dedcc3e ("iio: core: centralize ioctl() calls to the main chardev")
Signed-off-by: default avatarAlexandru Ardelean <aardelean@deviqon.com>
Reviewed-by: default avatarNuno Sá <nuno.sa@analog.com>
Tested-by: default avatarPaul Cercueil <paul@crapouillou.net>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f55ae144
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment