spi: tegra: don't treat NULL clk as an error
authorJamie Iles <jamie@jamieiles.com>
Mon, 10 Jan 2011 11:05:06 +0000 (11:05 +0000)
committerGrant Likely <grant.likely@secretlab.ca>
Mon, 10 Jan 2011 23:44:01 +0000 (16:44 -0700)
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>
drivers/spi/spi_tegra.c

index bb7df02a5472fdf3f7caf73d6ae82a6ffca9464b..891e5909038c4e4dd20bd956b33dca8e317630ac 100644 (file)
@@ -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;