Skip to content

Commit 78e4d34

Browse files
eunovmambarus
authored andcommitted
mtd: spi-nor: hisi-sfc: Remove excessive clk_disable_unprepare()
hisi_spi_nor_probe() invokes clk_disable_unprepare() on all paths after successful call of clk_prepare_enable(). Besides, the clock is enabled by hispi_spi_nor_prep() and disabled by hispi_spi_nor_unprep(). So at remove time it is not possible to have the clock enabled. The patch removes excessive clk_disable_unprepare() from hisi_spi_nor_remove(). Found by Linux Driver Verification project (linuxtesting.org). Fixes: e523f11 ("mtd: spi-nor: add hisilicon spi-nor flash controller driver") Signed-off-by: Evgeny Novikov <[email protected]> Signed-off-by: Tudor Ambarus <[email protected]> Reviewed-by: Pratyush Yadav <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 15b0205 commit 78e4d34

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/mtd/spi-nor/controllers/hisi-sfc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,6 @@ static int hisi_spi_nor_remove(struct platform_device *pdev)
477477

478478
hisi_spi_nor_unregister_all(host);
479479
mutex_destroy(&host->lock);
480-
clk_disable_unprepare(host->clk);
481480
return 0;
482481
}
483482

0 commit comments

Comments
 (0)