Skip to content

Commit

Permalink
regulator: max8907: Properly set pmic pointer in max8907_regulator_re…
Browse files Browse the repository at this point in the history
…move()

Add missing platform_get_drvdata() call in max8907_regulator_remove(), this
fixes below build warning:

  CC [M]  drivers/regulator/max8907-regulator.o
drivers/regulator/max8907-regulator.c: In function 'max8907_regulator_remove':
drivers/regulator/max8907-regulator.c:353:23: warning: 'pmic' is used uninitialized in this function [-Wuninitialized]

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Aug 28, 2012
1 parent 7305608 commit 0764ef5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/max8907-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static __devinit int max8907_regulator_probe(struct platform_device *pdev)

static __devexit int max8907_regulator_remove(struct platform_device *pdev)
{
struct max8907_regulator *pmic;
struct max8907_regulator *pmic = platform_get_drvdata(pdev);
int i;

for (i = 0; i < MAX8907_NUM_REGULATORS; i++)
Expand Down

0 comments on commit 0764ef5

Please sign in to comment.