]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spi-nor: hisi-sfc: Remove excessive clk_disable_unprepare()
authorEvgeny Novikov <novikov@ispras.ru>
Fri, 9 Jul 2021 14:45:29 +0000 (17:45 +0300)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 15 Oct 2021 08:43:05 +0000 (11:43 +0300)
commite4d59530a453b029016bf7731820b57ba5f3ba31
tree8a23a55de490e88e749b0ff7f55a6bd3c60e35ee
parent40e457cef00bd9424fcbf1dd68ffb8b77c796151
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: e939e069a757 ("mtd: spi-nor: add hisilicon spi-nor flash controller driver")
Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20210709144529.31379-1-novikov@ispras.ru
drivers/mtd/spi-nor/controllers/hisi-sfc.c