mirror of
https://github.com/torvalds/linux.git
synced 2025-11-02 09:40:27 +02:00
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: Andres Urian Florez <andres.emb.sys@gmail.com> Link: https://patch.msgid.link/20250608230422.325360-1-andres.emb.sys@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2b74aea6d0
commit
e51a086117
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue