Re: [PATCH v12 02/17] counter: Return error code on invalid modes

From: David Lechner
Date: Fri Jul 09 2021 - 13:53:53 EST


On 7/5/21 3:18 AM, William Breathitt Gray wrote:
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 cases for the sake of making the
intent of the code clear.

Cc: Kamel Bouhara <kamel.bouhara@xxxxxxxxxxx>
Cc: Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx>
Cc: Alexandre Torgue <alexandre.torgue@xxxxxx>
Cc: David Lechner <david@xxxxxxxxxxxxxx>
Acked-by: Syed Nayyar Waris <syednwaris@xxxxxxxxx>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@xxxxxxxxxxx>
Signed-off-by: William Breathitt Gray <vilhelm.gray@xxxxxxxxx>
---


Acked-by: David Lechner <david@xxxxxxxxxxxxxx>