Skip to content

Commit

Permalink
spi: davinci: Handle return value of clk_prepare_enable
Browse files Browse the repository at this point in the history
clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Arvind Yadav authored and Mark Brown committed Jun 6, 2017
1 parent 2b747a5 commit 35fc3b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/spi/spi-davinci.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,9 @@ static int davinci_spi_probe(struct platform_device *pdev)
ret = -ENODEV;
goto free_master;
}
clk_prepare_enable(dspi->clk);
ret = clk_prepare_enable(dspi->clk);
if (ret)
goto free_master;

master->dev.of_node = pdev->dev.of_node;
master->bus_num = pdev->id;
Expand Down

0 comments on commit 35fc3b9

Please sign in to comment.