On 05/10/2013 02:17 AM, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

> diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c

> -     r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -     if (!r) {
> -             dev_err(&pdev->dev, "No IO memory resource\n");
> -             ret = -ENODEV;
> -             goto exit_free_master;
> -     }
>       tspi->phys = r->start;
> +     r = platform_get_resource(pdev, IORESOURCE_MEM, 0);

The tspi->phy assignment is broken there now.

> diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c

> -     r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -     if (!r) {
> -             dev_err(&pdev->dev, "No IO memory resource\n");
> -             ret = -ENODEV;
> -             goto exit_free_master;
> -     }
>       tspi->phys = r->start;
> +     r = platform_get_resource(pdev, IORESOURCE_MEM, 0);

Same here.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to