Commit 40369bf
spi: fsl-qspi: use devm function instead of driver remove
Driver use devm APIs to manage clk/irq/resources and register the spi
controller, but the legacy remove function will be called first during
device detach and trigger kernel panic. Drop the remove function and use
devm_add_action_or_reset() for driver cleanup to ensure the release
sequence.
Trigger kernel panic on i.MX8MQ by
echo 30bb0000.spi >/sys/bus/platform/drivers/fsl-quadspi/unbind
Cc: [email protected]
Fixes: 8fcb830 ("spi: spi-fsl-qspi: use devm_spi_register_controller")
Reported-by: Kevin Hao <[email protected]>
Signed-off-by: Han Xu <[email protected]>
Reviewed-by: Frank Li <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>1 parent d32c4e5 commit 40369bf
1 file changed
+17
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
847 | 860 | | |
848 | 861 | | |
849 | 862 | | |
| |||
934 | 947 | | |
935 | 948 | | |
936 | 949 | | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
937 | 954 | | |
938 | 955 | | |
939 | 956 | | |
| |||
953 | 970 | | |
954 | 971 | | |
955 | 972 | | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | | - | |
969 | 973 | | |
970 | 974 | | |
971 | 975 | | |
| |||
1003 | 1007 | | |
1004 | 1008 | | |
1005 | 1009 | | |
1006 | | - | |
1007 | 1010 | | |
1008 | 1011 | | |
1009 | 1012 | | |
| |||
0 commit comments