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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 1 Nov 2013 21:06:25 +0530 (IST)
From:	Govindarajulu Varadarajan <govindarajulu90@...il.com>
To:	Christophe Leroy <christophe.leroy@....fr>
cc:	Rob Herring <rob.herring@...xeda.com>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Stephen Warren <swarren@...dotorg.org>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Rob Landley <rob@...dley.net>,
	Grant Likely <grant.likely@...aro.org>,
	Krzysztof Halasa <khc@...waw.pl>, devicetree@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, devicetree@...r.kernel.org,
	jerome.chantelauze.ext@....fr
Subject: Re: [PATCH v2] WAN: Adding support for Infineon PEF2256 E1 chipset
 (FALC56)



On Fri, 1 Nov 2013, Christophe Leroy wrote:

> diff -urN a/drivers/net/wan/pef2256.c b/drivers/net/wan/pef2256.c
[..]
> +static int pef2256_remove(struct platform_device *pdev)
> +{
> +	struct net_device *ndev = dev_get_drvdata(&pdev->dev);
> +	struct pef2256_dev_priv *priv = dev_to_hdlc(ndev)->priv;
> +
> +
> +	device_remove_file(priv->dev, &dev_attr_regs);
> +	device_remove_file(priv->dev, &dev_attr_Tx_TS);
> +	device_remove_file(priv->dev, &dev_attr_Rx_TS);
> +	device_remove_file(priv->dev, &dev_attr_mode);
> +
> +	unregister_hdlc_device(priv->netdev);
> +
> +	free_netdev(priv->netdev);
> +
> +	iounmap(priv->base_addr);
> +
> +	kfree(priv);
> +
> +	dev_set_drvdata(&pdev->dev, NULL);

dev_set_drvdata is not necessary. driver core clears the driver data to NULL
after device_release or on probe failure.

//govind
--
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