Unverified Commit 296e8d28 authored by Andres Urian Florez's avatar Andres Urian Florez Committed by Mark Brown
Browse files

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: default avatarAndres Urian Florez <andres.emb.sys@gmail.com>
Reviewed-by: default avatarDavid Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250418171426.9868-1-andres.emb.sys@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fcab1637
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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)