mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 13/33] drivers/net/ethernet/renesas: don't check resource with devm_ioremap_resource
Date: Thu, 16 May 2013 08:37:15 -0700	[thread overview]
Message-ID: <1368718635.2194.55.camel@joe-AO722> (raw)
In-Reply-To: <1368702961-4325-14-git-send-email-wsa@the-dreams.de>

On Thu, 2013-05-16 at 13:15 +0200, 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/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
[]
> @@ -2745,11 +2745,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
>  	if (mdp->cd->tsu) {
>  		struct resource *rtsu;
>  		rtsu = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -		if (!rtsu) {
> -			dev_err(&pdev->dev, "Not found TSU resource\n");
> -			ret = -ENODEV;
> -			goto out_release;
> -		}
>  		mdp->tsu_addr = devm_ioremap_resource(&pdev->dev, rtsu);
>  		if (IS_ERR(mdp->tsu_addr)) {
>  			ret = PTR_ERR(mdp->tsu_addr);

I'm not sure it matters, but at least one of these
conversions will now return -EINVAL instead of -ENODEV



  reply	other threads:[~2013-05-16 15:37 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1368702961-4325-1-git-send-email-wsa@the-dreams.de>
2013-05-16 11:15 ` [PATCH 01/33] drivers/ata: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 02/33] drivers/char/hw_random: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 03/33] drivers/cpufreq: " Wolfram Sang
2013-05-16 11:15   ` Viresh Kumar
2013-05-16 11:15 ` [PATCH 04/33] drivers/dma: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 05/33] drivers/gpio: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 06/33] drivers/gpu/drm/exynos: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 07/33] drivers/gpu/host1x/drm: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 08/33] drivers/i2c/busses: " Wolfram Sang
2013-05-16 12:22   ` Barry Song
2013-05-20 16:40   ` Kukjin Kim
2013-05-16 11:15 ` [PATCH 09/33] drivers/memory: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 10/33] drivers/mfd: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 11/33] drivers/misc: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 12/33] drivers/mtd/nand: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 13/33] drivers/net/ethernet/renesas: " Wolfram Sang
2013-05-16 15:37   ` Joe Perches [this message]
2013-05-16 11:15 ` [PATCH 14/33] drivers/pinctrl: " Wolfram Sang
2013-05-20 11:39   ` Linus Walleij
2013-05-20 17:13     ` Wolfram Sang
2013-05-20 18:34       ` Linus Walleij
2013-05-16 11:15 ` [PATCH 15/33] drivers/pwm: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 16/33] drivers/rtc: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 17/33] drivers/spi: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 18/33] drivers/staging/dwc2: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 19/33] drivers/staging/nvec: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 20/33] drivers/thermal: " Wolfram Sang
2013-05-20 15:38   ` Zhang, Rui
2013-05-16 11:15 ` [PATCH 21/33] drivers/usb/chipidea: " Wolfram Sang
2013-05-16 11:29   ` Alexander Shishkin
2013-05-16 11:15 ` [PATCH 22/33] drivers/usb/gadget: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 23/33] drivers/usb/host: " Wolfram Sang
2013-05-16 14:27   ` Alan Stern
2013-05-16 11:15 ` [PATCH 24/33] drivers/usb/phy: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 25/33] drivers/video/omap2: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 26/33] drivers/video/omap2/dss: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 27/33] drivers/w1/masters: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 28/33] drivers/watchdog: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 29/33] arch/arm/mach-tegra: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 30/33] arch/arm/plat-samsung: " Wolfram Sang
2013-05-20 16:38   ` Kukjin Kim
2013-05-20 17:11     ` Wolfram Sang
2013-05-20 17:13       ` Kukjin Kim
2013-05-16 11:15 ` [PATCH 31/33] arch/mips/lantiq/xway: " Wolfram Sang
2013-05-16 14:42   ` John Crispin
2013-05-16 11:16 ` [PATCH 32/33] sound/soc/fsl: " Wolfram Sang
2013-05-16 11:16 ` [PATCH 33/33] sound/soc/kirkwood: " Wolfram Sang

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=1368718635.2194.55.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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

all inboxes | Powered by JetHome®