File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -613,7 +613,7 @@ static int transceive(const struct device *dev,
613
613
614
614
ret = spi_stm32_configure (dev , config );
615
615
if (ret ) {
616
- return ret ;
616
+ goto end ;
617
617
}
618
618
619
619
/* Set buffers info */
@@ -656,6 +656,7 @@ static int transceive(const struct device *dev,
656
656
657
657
#endif
658
658
659
+ end :
659
660
spi_context_release (& data -> ctx , ret );
660
661
661
662
return ret ;
@@ -710,8 +711,8 @@ static int transceive_dma(const struct device *dev,
710
711
k_sem_reset (& data -> status_sem );
711
712
712
713
ret = spi_stm32_configure (dev , config );
713
- if (ret != 0 ) {
714
- return ret ;
714
+ if (ret ) {
715
+ goto end ;
715
716
}
716
717
717
718
/* Set buffers info */
@@ -777,6 +778,7 @@ static int transceive_dma(const struct device *dev,
777
778
778
779
spi_stm32_complete (dev , ret );
779
780
781
+ end :
780
782
spi_context_release (& data -> ctx , ret );
781
783
782
784
return ret ;
You can’t perform that action at this time.
0 commit comments