summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Urian Florez <andres.emb.sys@gmail.com>2025-04-18 12:14:24 -0500
committerMark Brown <broonie@kernel.org>2025-04-21 17:22:30 +0100
commit296e8d289bdd7eb0d832683ebd3e847fbb4c1b12 (patch)
treec330398631777a873468836912f3eaa2eeaa1f74
parentfcab1637bb115b3b7bbc600a6d019b785653f2d5 (diff)
spi: offload: remove unnecessary check on trigger->ops
Considering that trigger->ops = NULL happens only when the trigger is being removed from the list, and at that point the operation is protected with the spi_offload_triggers_lock, it is possible to remove the !trigger->ops check because it will never be true in spi_offload_trigger_get() Signed-off-by: Andres Urian Florez <andres.emb.sys@gmail.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250418171426.9868-1-andres.emb.sys@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-offload.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/spi/spi-offload.c b/drivers/spi/spi-offload.c
index 21a0f3a3a176..e674097bf3be 100644
--- a/drivers/spi/spi-offload.c
+++ b/drivers/spi/spi-offload.c
@@ -183,9 +183,6 @@ static struct spi_offload_trigger
guard(mutex)(&trigger->lock);
- if (!trigger->ops)
- return ERR_PTR(-ENODEV);
-
if (trigger->ops->request) {
ret = trigger->ops->request(trigger, type, args->args, args->nargs);
if (ret)