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

spi: offload: check offload ops existence before disabling the trigger



Add a safe guard in spi_offload_trigger to check the existence of
offload->ops before invoking the trigger_disable callback

Signed-off-by: default avatarAndres Urian Florez <andres.emb.sys@gmail.com>
Link: https://patch.msgid.link/20250608230422.325360-1-andres.emb.sys@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2b74aea6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -297,7 +297,7 @@ int spi_offload_trigger_enable(struct spi_offload *offload,
	if (trigger->ops->enable) {
		ret = trigger->ops->enable(trigger, config);
		if (ret) {
			if (offload->ops->trigger_disable)
			if (offload->ops && offload->ops->trigger_disable)
				offload->ops->trigger_disable(offload);
			return ret;
		}