diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-06-05 17:36:28 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-06-06 19:36:45 +0100 |
commit | 35fc3b9ff66b907ca7a75c971decf291adf78131 (patch) | |
tree | 1b2b3bd63dbdbab91c27f1aa4165fa66a2de56a9 /drivers/spi | |
parent | 2b747a5f04fbb26ad09241506704ddce462e581b (diff) | |
download | linux-stable-35fc3b9ff66b907ca7a75c971decf291adf78131.tar.gz linux-stable-35fc3b9ff66b907ca7a75c971decf291adf78131.tar.bz2 linux-stable-35fc3b9ff66b907ca7a75c971decf291adf78131.zip |
spi: davinci: Handle return value of clk_prepare_enable
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>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-davinci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 0b4493e7fe9e..6ddb6ef1fda4 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -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; |