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:	Thu, 14 Apr 2011 12:39:12 +0200
From:	Antonio Ospite <ospite@...denti.unina.it>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	linux-wireless@...r.kernel.org, openezx-devel@...ts.openezx.org,
	"John W . Linville" <linville@...driver.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	linux-kernel@...r.kernel.org, Marek Vasut <marek.vasut@...il.com>,
	Guiming Zhuo <gmzhuo@...il.com>
Subject: Re: [PATCH v3] rfkill: Regulator consumer driver for rfkill

On Wed, 13 Apr 2011 21:53:03 +0200
Johannes Berg <johannes@...solutions.net> wrote:

> On Wed, 2011-04-13 at 21:40 +0200, Antonio Ospite wrote:
> 
> > +static int __devinit rfkill_regulator_probe(struct platform_device *pdev)
> 
> ...
> 
> > +	platform_set_drvdata(pdev, rfkill_data);
> 
> > +static int __devexit rfkill_regulator_remove(struct platform_device *pdev)
> > +{
> > +	struct rfkill_regulator_data *rfkill_data = platform_get_drvdata(pdev);
> > +	struct rfkill *rf_kill = rfkill_data->rf_kill;
> > +
> > +	rfkill_unregister(rf_kill);
> > +	rfkill_destroy(rf_kill);
> > +	regulator_put(rfkill_data->vcc);
> > +	kfree(rfkill_data);
> > +
> > +	return 0;
> > +}
> 
> Should remove do platform_set_drvdata(pdev, NULL)?
>

AFAICS this is not strictly necessary because we never check for NULL
here and we are setting drvdata again in _probe() each time the module
is loaded anyways. If it is considered a good practice for symmetry
reasons then I'll add it, no problem. Does anyone has comments on that?

> In any case, that's the only thing I see now and I did read the code
> carefully, so if that's not necessary:
> 
> Reviewed-by: Johannes Berg <johannes@...solutions.net>
> 
> Otherwise, feel free to include that in v4.
> 
> johannes
> 

Thanks for taking the time to look at the code Johannes.

Regards,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ