Skip to content

Commit 296e8d2

Browse files
andres-embbroonie
authored andcommitted
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>
1 parent fcab163 commit 296e8d2

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/spi/spi-offload.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ static struct spi_offload_trigger
183183

184184
guard(mutex)(&trigger->lock);
185185

186-
if (!trigger->ops)
187-
return ERR_PTR(-ENODEV);
188-
189186
if (trigger->ops->request) {
190187
ret = trigger->ops->request(trigger, type, args->args, args->nargs);
191188
if (ret)

0 commit comments

Comments
 (0)