public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] regulator/ab8500: move dereference below the check for NULL
@ 2010-08-14  9:03 Dan Carpenter
  2010-08-14  9:36 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2010-08-14  9:03 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: Mark Brown, Bengt JONSSON, Sundar R Iyer, Linus Walleij,
	linux-kernel, kernel-janitors

I moved the dereference of "ab8500" below the check for NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index dc3f1a4..cc7cbaf 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -344,13 +344,14 @@ static inline struct ab8500_regulator_info *find_regulator_info(int id)
 static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
 {
 	struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
-	struct ab8500_platform_data *pdata = dev_get_platdata(ab8500->dev);
+	struct ab8500_platform_data *pdata;
 	int i, err;
 
 	if (!ab8500) {
 		dev_err(&pdev->dev, "null mfd parent\n");
 		return -EINVAL;
 	}
+	pdata = dev_get_platdata(ab8500->dev);
 
 	/* register all regulators */
 	for (i = 0; i < ARRAY_SIZE(ab8500_regulator_info); i++) {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [patch] regulator/ab8500: move dereference below the check for NULL
  2010-08-14  9:03 [patch] regulator/ab8500: move dereference below the check for NULL Dan Carpenter
@ 2010-08-14  9:36 ` Mark Brown
  2010-08-14  9:57   ` Sundar R IYER
  2010-08-14 11:15   ` Liam Girdwood
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Brown @ 2010-08-14  9:36 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Liam Girdwood, Bengt JONSSON, Sundar R Iyer, Linus Walleij,
	linux-kernel, kernel-janitors

On 14 Aug 2010, at 10:03, Dan Carpenter wrote:

> I moved the dereference of "ab8500" below the check for NULL.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] regulator/ab8500: move dereference below the check for NULL
  2010-08-14  9:36 ` Mark Brown
@ 2010-08-14  9:57   ` Sundar R IYER
  2010-08-14 11:15   ` Liam Girdwood
  1 sibling, 0 replies; 4+ messages in thread
From: Sundar R IYER @ 2010-08-14  9:57 UTC (permalink / raw)
  To: Mark Brown
  Cc: Dan Carpenter, Liam Girdwood, Bengt JONSSON, Linus WALLEIJ,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org

On Sat, Aug 14, 2010 at 11:36:13 +0200, Mark Brown wrote:
> On 14 Aug 2010, at 10:03, Dan Carpenter wrote:
> 
> > I moved the dereference of "ab8500" below the check for NULL.
> > 
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Thanx!

Regards,
Sundar

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] regulator/ab8500: move dereference below the check for NULL
  2010-08-14  9:36 ` Mark Brown
  2010-08-14  9:57   ` Sundar R IYER
@ 2010-08-14 11:15   ` Liam Girdwood
  1 sibling, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2010-08-14 11:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: Dan Carpenter, Bengt JONSSON, Sundar R Iyer, Linus Walleij,
	linux-kernel, kernel-janitors

On Sat, 2010-08-14 at 10:36 +0100, Mark Brown wrote:
> On 14 Aug 2010, at 10:03, Dan Carpenter wrote:
> 
> > I moved the dereference of "ab8500" below the check for NULL.
> > 
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Applied.

Thanks

Liam
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-14 11:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-14  9:03 [patch] regulator/ab8500: move dereference below the check for NULL Dan Carpenter
2010-08-14  9:36 ` Mark Brown
2010-08-14  9:57   ` Sundar R IYER
2010-08-14 11:15   ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox