lkml.org 
[lkml]   [2012]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] regulator: max8907: Properly set pmic pointer in max8907_regulator_remove()
From
Date
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>
---
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 bd3b28b..831488f 100644
--- a/drivers/regulator/max8907-regulator.c
+++ b/drivers/regulator/max8907-regulator.c
@@ -346,7 +346,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++)
--
1.7.9.5




\
 
 \ /
  Last update: 2012-08-18 09:01    [W:0.048 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site