Olof Johansson wrote at Wednesday, January 04, 2012 11:01 PM:
> This is the first step in making it device-tree aware and get rid of the
> in-kernel EMC tables (of which there are none in mainline, thankfully).
> 
> Changes since v2:
> 
> * D'oh -- missed a couple of variables that were added, never used and then
>   later removed in a later patch.
> 
> Changes since v1:
> 
> * Fixed messed up indentation
> * Removed code that should be gone (was added here and removed later in 
> series)
> 
> Signed-off-by: Olof Johansson <[email protected]>
...
> diff --git a/arch/arm/mach-tegra/tegra2_emc.c 
> b/arch/arm/mach-tegra/tegra2_emc.c
...
> +static int __devinit tegra_emc_probe(struct platform_device *pdev)
...
> +     if (!request_mem_region(res->start, resource_size(res), "tegra_emc")) {
> +             dev_err(&pdev->dev, "failed to request register region\n");
> +             return -EBUSY;
> +     }
> +
> +     emc_regbase = ioremap(res->start, resource_size(res));

Don't you need to error-check the ioremap() result, and undo the
request_mem_region() too? Or, use the devm variant to request the
region. The rest of the code checks emc_pdev!=NULL which won't detect
this failure.

Isn't there a get_resource && request && remap function now; I think I
recall a patch that wraps all that into one function, but it might have
been DT-only.

Otherwise,

Acked-by: Stephen Warren <[email protected]>

-- 
nvpublic

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to