diff mbox

[2/7] drivers/amba: don't check resource with devm_ioremap_resource

Message ID 1389700739-3696-2-git-send-email-wsa@the-dreams.de
State Accepted, archived
Delegated to: Stephen Warren
Headers show

Commit Message

Wolfram Sang Jan. 14, 2014, 11:58 a.m. UTC
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---

Should go via subsystem tree

 drivers/amba/tegra-ahb.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Thierry Reding Jan. 14, 2014, 1:32 p.m. UTC | #1
On Tue, Jan 14, 2014 at 12:58:53PM +0100, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
> 
> Should go via subsystem tree
> 
>  drivers/amba/tegra-ahb.c | 2 --
>  1 file changed, 2 deletions(-)

Reviewed-by: Thierry Reding <treding@nvidia.com>
Stephen Warren Jan. 14, 2014, 5:40 p.m. UTC | #2
On 01/14/2014 04:58 AM, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

This looks fine. I expect to apply it for 3.15 after the 3.14 merge
window, unless it's urgent to get it into 3.14 for some reason?
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang Jan. 14, 2014, 6:30 p.m. UTC | #3
> This looks fine. I expect to apply it for 3.15 after the 3.14 merge
> window, unless it's urgent to get it into 3.14 for some reason?

Nope, it is not. I wasn't aiming for 3.14, it was simply in my queue.
Stephen Warren Feb. 5, 2014, 5:18 p.m. UTC | #4
On 01/14/2014 04:58 AM, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

Applied to Tegra's for-3.15/drivers branch.

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

Patch

diff --git a/drivers/amba/tegra-ahb.c b/drivers/amba/tegra-ahb.c
index 1f44e56c..558a239 100644
--- a/drivers/amba/tegra-ahb.c
+++ b/drivers/amba/tegra-ahb.c
@@ -256,8 +256,6 @@  static int tegra_ahb_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
 	ahb->regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(ahb->regs))
 		return PTR_ERR(ahb->regs);