linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: linux-kernel@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Stephen Warren <swarren@wwwdotorg.org>,
	linux-tegra@vger.kernel.org
Subject: [PATCH 10/27] drivers/memory: don't check resource with devm_ioremap_resource
Date: Tue, 23 Jul 2013 20:01:43 +0200	[thread overview]
Message-ID: <1374602524-3398-11-git-send-email-wsa@the-dreams.de> (raw)
In-Reply-To: <1374602524-3398-1-git-send-email-wsa@the-dreams.de>

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>
---
Please apply via the subsystem-tree.

 drivers/memory/tegra20-mc.c |    2 --
 drivers/memory/tegra30-mc.c |    2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/memory/tegra20-mc.c b/drivers/memory/tegra20-mc.c
index 0548eea..7cd82b8 100644
--- a/drivers/memory/tegra20-mc.c
+++ b/drivers/memory/tegra20-mc.c
@@ -218,8 +218,6 @@ static int tegra20_mc_probe(struct platform_device *pdev)
 		struct resource *res;
 
 		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
-		if (!res)
-			return -ENODEV;
 		mc->regs[i] = devm_ioremap_resource(&pdev->dev, res);
 		if (IS_ERR(mc->regs[i]))
 			return PTR_ERR(mc->regs[i]);
diff --git a/drivers/memory/tegra30-mc.c b/drivers/memory/tegra30-mc.c
index 58d2979..ef79345 100644
--- a/drivers/memory/tegra30-mc.c
+++ b/drivers/memory/tegra30-mc.c
@@ -340,8 +340,6 @@ static int tegra30_mc_probe(struct platform_device *pdev)
 		struct resource *res;
 
 		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
-		if (!res)
-			return -ENODEV;
 		mc->regs[i] = devm_ioremap_resource(&pdev->dev, res);
 		if (IS_ERR(mc->regs[i]))
 			return PTR_ERR(mc->regs[i]);
-- 
1.7.10.4


  parent reply	other threads:[~2013-07-23 18:03 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
2013-07-23 18:01 ` [PATCH 01/27] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource Wolfram Sang
2013-07-23 18:02   ` John Crispin
2013-07-23 18:01 ` [PATCH 02/27] drivers/amba: " Wolfram Sang
2013-07-24  1:34   ` Stephen Warren
2013-07-23 18:01 ` [PATCH 03/27] drivers/cpuidle: " Wolfram Sang
2013-07-23 21:26   ` Rafael J. Wysocki
2013-07-23 18:01 ` [PATCH 04/27] drivers/dma: " Wolfram Sang
2013-08-19  8:58   ` Vinod Koul
2013-08-19 10:03     ` Wolfram Sang
2013-07-23 18:01 ` [PATCH 05/27] drivers/gpu/host1x/drm: " Wolfram Sang
2013-08-01 10:20   ` Terje Bergström
2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: " Wolfram Sang
2013-07-29 16:39   ` Linus Walleij
2013-08-07 15:38   ` Wolfram Sang
2013-07-23 18:01 ` [PATCH 07/27] drivers/input/serio: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 08/27] drivers/iommu: " Wolfram Sang
2013-07-24  1:30   ` Stephen Warren
2013-07-23 18:01 ` [PATCH 09/27] drivers/media/platform: " Wolfram Sang
2013-07-23 18:01 ` Wolfram Sang [this message]
2013-07-23 18:25   ` [PATCH 10/27] drivers/memory: " Joe Perches
2013-07-24  1:27     ` Stephen Warren
2013-07-24  1:38       ` Joe Perches
2013-07-24  1:32   ` Stephen Warren
2013-07-24  1:50   ` Joe Perches
2013-07-24 15:28     ` Wolfram Sang
2013-07-24 15:51       ` Joe Perches
2013-07-23 18:01 ` [PATCH 11/27] drivers/mtd/nand: " Wolfram Sang
2013-07-23 18:09   ` Fabio Estevam
2013-07-23 18:01 ` [PATCH 12/27] drivers/net/ethernet/stmicro/stmmac: " Wolfram Sang
2013-07-25  6:59   ` David Miller
2013-07-23 18:01 ` [PATCH 13/27] drivers/pci/host: " Wolfram Sang
2013-07-23 18:12   ` Bjorn Helgaas
2013-07-23 23:17     ` Jingoo Han
2013-07-23 18:01 ` [PATCH 14/27] drivers/pinctrl: " Wolfram Sang
2013-08-07 18:14   ` Linus Walleij
2013-07-23 18:01 ` [PATCH 15/27] drivers/pwm: " Wolfram Sang
2013-08-14  9:43   ` Thierry Reding
2013-07-23 18:01 ` [PATCH 16/27] drivers/scsi/ufs: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 17/27] drivers/spi: " Wolfram Sang
2013-07-24 14:29   ` Mark Brown
2013-07-24 15:30     ` Wolfram Sang
2013-07-23 18:01 ` [PATCH 18/27] drivers/staging/imx-drm: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 19/27] drivers/usb/phy: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 20/27] drivers/watchdog: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 21/27] sound/soc/au1x: " Wolfram Sang
2013-07-24 14:31   ` Mark Brown
2013-07-23 18:01 ` [PATCH 22/27] sound/soc/cirrus: " Wolfram Sang
2013-07-24 14:33   ` Mark Brown
2013-07-23 18:01 ` [PATCH 23/27] sound/soc/nuc900: " Wolfram Sang
2013-07-24 14:34   ` Mark Brown
2013-07-23 18:01 ` [PATCH 24/27] sound/soc/pxa: " Wolfram Sang
2013-07-24 14:35   ` Mark Brown
2013-07-23 18:01 ` [PATCH 25/27] sound/soc/tegra: " Wolfram Sang
2013-07-24 14:37   ` Mark Brown
2013-07-23 18:01 ` [PATCH 26/27] sound/soc/txx9: " Wolfram Sang
2013-07-24 14:37   ` Mark Brown
2013-07-23 18:02 ` [PATCH 27/27] thermal: ti-bandgap: cleanup resource allocation Wolfram Sang
2013-07-26 15:43   ` Eduardo Valentin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1374602524-3398-11-git-send-email-wsa@the-dreams.de \
    --to=wsa@the-dreams.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=swarren@wwwdotorg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).