spi/spi_mpc8xxx: fix potential memory corruption.
tx_dma/rx_dma are already set to a dummy buffer when no tx/rx buffer and t->tx_dma/t->rx_dma does not contain a dma address, but NULL. This may lead to corruption of kernel memory. Fix this by leaving tx_dma/rx_dma alone. Do not INIT_TX_RX while controller is enabled, this is bad according to the MPC8321 manual. Signed-off-by: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
Showing
想要评论请 注册 或 登录