lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1368718635.2194.55.camel@joe-AO722>
Date:	Thu, 16 May 2013 08:37:15 -0700
From:	Joe Perches <joe@...ches.com>
To:	Wolfram Sang <wsa@...-dreams.de>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 13/33] drivers/net/ethernet/renesas: don't check
 resource with devm_ioremap_resource

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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ