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

Commit 19f0ad09 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Mark Brown
Browse files

spi: sh-msiof: cleanup wait_for_completion return handling



return type of wait_for_completion_timeout is unsigned long not int, this
patch uses the return value of wait_for_completion_timeout in the condition
directly rather than assigning it to an incorrect type variable.

Signed-off-by: default avatarNicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 65d5665b
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -636,8 +636,7 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
	}

	/* wait for tx fifo to be emptied / rx fifo to be filled */
	ret = wait_for_completion_timeout(&p->done, HZ);
	if (!ret) {
	if (!wait_for_completion_timeout(&p->done, HZ)) {
		dev_err(&p->pdev->dev, "PIO timeout\n");
		ret = -ETIMEDOUT;
		goto stop_reset;
@@ -747,8 +746,7 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
	}

	/* wait for tx fifo to be emptied / rx fifo to be filled */
	ret = wait_for_completion_timeout(&p->done, HZ);
	if (!ret) {
	if (!wait_for_completion_timeout(&p->done, HZ)) {
		dev_err(&p->pdev->dev, "DMA timeout\n");
		ret = -ETIMEDOUT;
		goto stop_reset;