Commit f8b9ae7
spi: spi-qpic-snand: unregister ECC engine on probe error and device remove
The on-host hardware ECC engine remains registered both when
the spi_register_controller() function returns with an error
and also on device removal.
Change the qcom_spi_probe() function to unregister the engine
on the error path, and add the missing unregistering call to
qcom_spi_remove() to avoid possible use-after-free issues.
Fixes: 7304d19 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Message-ID: <20250903-qpic-snand-unregister-ecceng-v1-1-ef5387b0abdc@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 36055bc commit f8b9ae7
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1615 | 1615 | | |
1616 | 1616 | | |
1617 | 1617 | | |
1618 | | - | |
| 1618 | + | |
1619 | 1619 | | |
1620 | 1620 | | |
1621 | 1621 | | |
1622 | 1622 | | |
| 1623 | + | |
| 1624 | + | |
1623 | 1625 | | |
1624 | 1626 | | |
1625 | 1627 | | |
| |||
1641 | 1643 | | |
1642 | 1644 | | |
1643 | 1645 | | |
1644 | | - | |
| 1646 | + | |
1645 | 1647 | | |
1646 | 1648 | | |
1647 | 1649 | | |
| |||
0 commit comments