From 0764ef59161a4026c44ca184b7812383feabb769 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 18 Aug 2012 14:33:05 +0800 Subject: [PATCH] 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: Axel Lin Acked-by: Stephen Warren Signed-off-by: Mark Brown --- drivers/regulator/max8907-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index bdf21a1..bddc314 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c @@ -347,7 +347,7 @@ err_unregister_regulator: 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++) -- 2.7.4