diff options
author | Dan Carpenter <error27@gmail.com> | 2010-08-14 13:03:16 +0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-09-01 15:59:33 +0400 |
commit | af54decd6a2b8efa335020afc77254355c4c1bab (patch) | |
tree | c2c70b39c21c0b402c49a556011fb1081aeebbf6 /drivers/regulator | |
parent | 2bfc96a127bc1cc94d26bfaa40159966064f9c8c (diff) | |
download | linux-af54decd6a2b8efa335020afc77254355c4c1bab.tar.xz |
regulator/ab8500: move dereference below the check for NULL
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>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/ab8500.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index dc3f1a491675..cc7cbafc5b94 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++) { |