On Tue, Sep 20, 2022 at 09:48:14PM +0800, Yang Yingliang wrote: > Switch to use devm_spi_alloc_master() to simpify error path. That's not sufficient. You also need to remove the call to spi_master_put() from tiny_spi_remove(), lest you introduce a use-after-free. Thanks, Lukas