Commit 951a04a
spi: spi-imx: Add check for spi_imx_setupxfer()
Add check for the return value of spi_imx_setupxfer().
spi_imx->rx and spi_imx->tx function pointer can be NULL when
spi_imx_setupxfer() return error, and make NULL pointer dereference.
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Call trace:
0x0
spi_imx_pio_transfer+0x50/0xd8
spi_imx_transfer_one+0x18c/0x858
spi_transfer_one_message+0x43c/0x790
__spi_pump_transfer_message+0x238/0x5d4
__spi_sync+0x2b0/0x454
spi_write_then_read+0x11c/0x200
Signed-off-by: Tamura Dai <[email protected]>
Reviewed-by: Carlos Song <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>1 parent 21f4314 commit 951a04a
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1695 | 1695 | | |
1696 | 1696 | | |
1697 | 1697 | | |
| 1698 | + | |
1698 | 1699 | | |
1699 | 1700 | | |
1700 | | - | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
1701 | 1704 | | |
1702 | 1705 | | |
1703 | 1706 | | |
| |||
0 commit comments