diff options
author | William Breathitt Gray <vilhelm.gray@gmail.com> | 2021-08-03 14:06:12 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-08-09 21:17:36 +0200 |
commit | b11eed1554e8ea33b748094ea73d8b42fa2bbe3b (patch) | |
tree | 9fef0018387c91f35cf29b9d8386da362814239f /sound/arm | |
parent | counter: 104-quad-8: Return error when invalid mode during ceiling_write (diff) | |
download | linux-b11eed1554e8ea33b748094ea73d8b42fa2bbe3b.tar.xz linux-b11eed1554e8ea33b748094ea73d8b42fa2bbe3b.zip |
counter: Return error code on invalid modes
Only a select set of modes (function, action, etc.) are valid for a
given device configuration. This patch ensures that invalid modes result
in a return -EINVAL. Such a situation should never occur in reality, but
it's good to define a default switch case for the sake of making the
intent of the code clear.
Cc: Kamel Bouhara <kamel.bouhara@bootlin.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Acked-by: David Lechner <david@lechnology.com>
Acked-by: Syed Nayyar Waris <syednwaris@gmail.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/7af82d4e39610da11edce0ee370285fe1cb1eac8.1627990337.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'sound/arm')
0 files changed, 0 insertions, 0 deletions