Commit af0670b
iio: core: return ENODEV if ioctl is unknown
When the ioctl() mechanism was introduced in IIO core to centralize the
registration of all ioctls in one place via commit 8dedcc3 ("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: 8dedcc3 ("iio: core: centralize ioctl() calls to the main chardev")
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Tested-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>1 parent 901f84d commit af0670b
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1778 | 1778 | | |
1779 | 1779 | | |
1780 | 1780 | | |
1781 | | - | |
1782 | 1781 | | |
1783 | 1782 | | |
1784 | 1783 | | |
1785 | 1784 | | |
1786 | 1785 | | |
1787 | 1786 | | |
1788 | 1787 | | |
1789 | | - | |
| 1788 | + | |
1790 | 1789 | | |
1791 | 1790 | | |
1792 | 1791 | | |
| |||
0 commit comments