Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a5165a8 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Cyrille Pitchen
Browse files

mtd: spi-nor: hisi: do not ignore clk_prepare_enable() failure



hisi_spi_nor_probe() ignores clk_prepare_enable() error code.
The patch fixes that.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: default avatarMarek Vasut <marek.vasut@gmail.com>
Signed-off-by: default avatarCyrille Pitchen <cyrille.pitchen@atmel.com>
parent c1ae3cfa
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -448,8 +448,11 @@ static int hisi_spi_nor_probe(struct platform_device *pdev)
	if (!host->buffer)
	if (!host->buffer)
		return -ENOMEM;
		return -ENOMEM;


	ret = clk_prepare_enable(host->clk);
	if (ret)
		return ret;

	mutex_init(&host->lock);
	mutex_init(&host->lock);
	clk_prepare_enable(host->clk);
	hisi_spi_nor_init(host);
	hisi_spi_nor_init(host);
	ret = hisi_spi_nor_register_all(host);
	ret = hisi_spi_nor_register_all(host);
	if (ret)
	if (ret)