projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b747a5
)
spi: davinci: Handle return value of clk_prepare_enable
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Mon, 5 Jun 2017 12:06:28 +0000
(17:36 +0530)
committer
Mark Brown
<broonie@kernel.org>
Tue, 6 Jun 2017 18:36:45 +0000
(19:36 +0100)
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>
drivers/spi/spi-davinci.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-davinci.c
b/drivers/spi/spi-davinci.c
index 0b4493e7fe9e75edfe315820d5e4535cc07d89b8..6ddb6ef1fda4ff0900b97d7b87942bbe9935475d 100644
(file)
--- 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;