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 <[email protected]> Reviewed-by: David Lechner <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent fcab163 commit 296e8d2

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

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)