Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0764ef59 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

regulator: max8907: Properly set pmic pointer in max8907_regulator_remove()



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: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 7305608b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -347,7 +347,7 @@ static __devinit int max8907_regulator_probe(struct platform_device *pdev)


static __devexit int max8907_regulator_remove(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;
	int i;


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