Fixed the problem of memory trampling caused by not initializing the structure

Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
This commit is contained in:
zhangkai25 2024-07-02 10:21:34 +08:00 committed by Xiang Xiao
parent f638a21f89
commit 4e3f77d884

View File

@ -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);