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]
Date:	Fri, 18 Apr 2014 23:19:25 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Guenter Roeck <linux@...ck-us.net>,
	Florian Fainelli <f.fainelli@...il.com>
CC:	Chris Healy <chealy@...co-us.com>, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH 1/3] net: mdio-gpio: Use devm_ functions where possible

Hello.

On 04/16/2014 06:16 AM, Guenter Roeck wrote:

> This simplifies error path and deinit/removal functions.

> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> ---
>   drivers/net/phy/mdio-gpio.c |   19 +++++--------------
>   1 file changed, 5 insertions(+), 14 deletions(-)

> diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
> index e701433..e853066 100644
> --- a/drivers/net/phy/mdio-gpio.c
> +++ b/drivers/net/phy/mdio-gpio.c
> @@ -110,7 +110,7 @@ static struct mii_bus *mdio_gpio_bus_init(struct device *dev,
[...]
> @@ -163,13 +159,8 @@ out:
>   static void mdio_gpio_bus_deinit(struct device *dev)
>   {
>   	struct mii_bus *bus = dev_get_drvdata(dev);
> -	struct mdio_gpio_info *bitbang = bus->priv;
>
> -	dev_set_drvdata(dev, NULL);

    You didn't even document this "drove-by" change. Ideally, it should have 
been in a separate patch.

> -	gpio_free(bitbang->mdio);
> -	gpio_free(bitbang->mdc);
>   	free_mdio_bitbang(bus);
> -	kfree(bitbang);
>   }

WBR, Sergei

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ