Skip to content

Commit

Permalink
spi: tegra: don't treat NULL clk as an error
Browse files Browse the repository at this point in the history
Some platforms have been known to return NULL from clk_get() if they
support only a single struct clk.  Whilst tegra doesn't do this, make
the drivers consistent with others.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Jamie Iles authored and Grant Likely committed Jan 10, 2011
1 parent e0e736f commit 76d9cc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi_tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static int __init spi_tegra_probe(struct platform_device *pdev)
}

tspi->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR_OR_NULL(tspi->clk)) {
if (IS_ERR(tspi->clk)) {
dev_err(&pdev->dev, "can not get clock\n");
ret = PTR_ERR(tspi->clk);
goto err2;
Expand Down

0 comments on commit 76d9cc4

Please sign in to comment.