spi: img-spfi: Remove spi_master_put in img_spfi_remove()
authorWei Yongjun <weiyj.lk@gmail.com>
Tue, 26 Jul 2016 14:57:55 +0000 (14:57 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 27 Jul 2016 18:00:16 +0000 (19:00 +0100)
The call to spi_master_put() in img_spfi_remove() is redundant since
the master is registered using devm_spi_register_master() and no
reference hold by using spi_master_get() in img_spfi_remove().

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-img-spfi.c

index 823cbc92d1e75447b1487158ac097e1de3d50470..7a37090dabbea55308b555d03f19dd56c4c3c15c 100644 (file)
@@ -720,8 +720,6 @@ static int img_spfi_remove(struct platform_device *pdev)
                clk_disable_unprepare(spfi->sys_clk);
        }
 
-       spi_master_put(master);
-
        return 0;
 }