summaryrefslogtreecommitdiff
path: root/drivers/counter/intel-qep.c
diff options
context:
space:
mode:
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>2021-08-03 15:06:13 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-08-09 22:17:36 +0300
commite2ff3198c580a3a3acfdc50cce5b5f8a941cbcd1 (patch)
treec362f49faac490020b6d8225340a7bb48e301ec3 /drivers/counter/intel-qep.c
parentb11eed1554e8ea33b748094ea73d8b42fa2bbe3b (diff)
downloadlinux-e2ff3198c580a3a3acfdc50cce5b5f8a941cbcd1.tar.xz
counter: Standardize to ERANGE for limit exceeded errors
ERANGE is a semantically better error code to return when an argument value falls outside the supported limit range of a device. Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Acked-by: Syed Nayyar Waris <syednwaris@gmail.com> Reviewed-by: David Lechner <david@lechnology.com> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/ae8d3b20b8b02c96b1c9898ffa2f9fa5d99edc81.1627990337.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/counter/intel-qep.c')
-rw-r--r--drivers/counter/intel-qep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c
index 1a9512e28519..204f94577666 100644
--- a/drivers/counter/intel-qep.c
+++ b/drivers/counter/intel-qep.c
@@ -319,7 +319,7 @@ static ssize_t spike_filter_ns_write(struct counter_device *counter,
}
if (length > INTEL_QEPFLT_MAX_COUNT(length))
- return -EINVAL;
+ return -ERANGE;
mutex_lock(&qep->lock);
if (qep->enabled) {