Commit 5d07ab2
spi: fsl-qspi: Fix double cleanup in probe error path
Commit 40369bf ("spi: fsl-qspi: use devm function instead of driver
remove") introduced managed cleanup via fsl_qspi_cleanup(), but
incorrectly retain manual cleanup in two scenarios:
- On devm_add_action_or_reset() failure, the function automatically call
fsl_qspi_cleanup(). However, the current code still jumps to
err_destroy_mutex, repeating cleanup.
- After the fsl_qspi_cleanup() action is added successfully, there is no
need to manually perform the cleanup in the subsequent error path.
However, the current code still jumps to err_destroy_mutex on spi
controller failure, repeating cleanup.
Skip redundant manual cleanup calls to fix these issues.
Cc: [email protected]
Fixes: 40369bf ("spi: fsl-qspi: use devm function instead of driver remove")
Signed-off-by: Kevin Hao <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>1 parent 0af2f6b commit 5d07ab2
1 file changed
+2
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
949 | 949 | | |
950 | 950 | | |
951 | 951 | | |
952 | | - | |
| 952 | + | |
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | | - | |
| 956 | + | |
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | 960 | | |
964 | 961 | | |
965 | 962 | | |
| |||
0 commit comments