Skip to content

Commit

Permalink
Fixed the problem of memory trampling caused by not initializing the …
Browse files Browse the repository at this point in the history
…structure

Signed-off-by: zhangkai25 <[email protected]>
  • Loading branch information
zhangkai25 authored and xiaoxiang781216 committed Aug 24, 2024
1 parent f638a21 commit 4e3f77d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions system/spi/spi_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ int spicmd_exch(FAR struct spitool_s *spitool, int argc, FAR char **argv)
trans.nwords = spitool->count;
trans.txbuffer = txdata;
trans.rxbuffer = rxdata;
#ifdef CONFIG_SPI_HWFEATURES
trans.hwfeat = 0;
#endif

ret = spidev_transfer(fd, &seq);

Expand Down

0 comments on commit 4e3f77d

Please sign in to comment.