diff options
-rw-r--r-- | drivers/base/power/clock_ops.c | 3 | ||||
-rw-r--r-- | drivers/base/power/common.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index 869d7ff2227f..eb78e9640c4a 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c | |||
@@ -169,8 +169,7 @@ void pm_clk_init(struct device *dev) | |||
169 | */ | 169 | */ |
170 | int pm_clk_create(struct device *dev) | 170 | int pm_clk_create(struct device *dev) |
171 | { | 171 | { |
172 | int ret = dev_pm_get_subsys_data(dev); | 172 | return dev_pm_get_subsys_data(dev); |
173 | return ret < 0 ? ret : 0; | ||
174 | } | 173 | } |
175 | 174 | ||
176 | /** | 175 | /** |
diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c index a14085cc613f..39c32529b833 100644 --- a/drivers/base/power/common.c +++ b/drivers/base/power/common.c | |||
@@ -24,7 +24,6 @@ | |||
24 | int dev_pm_get_subsys_data(struct device *dev) | 24 | int dev_pm_get_subsys_data(struct device *dev) |
25 | { | 25 | { |
26 | struct pm_subsys_data *psd; | 26 | struct pm_subsys_data *psd; |
27 | int ret = 0; | ||
28 | 27 | ||
29 | psd = kzalloc(sizeof(*psd), GFP_KERNEL); | 28 | psd = kzalloc(sizeof(*psd), GFP_KERNEL); |
30 | if (!psd) | 29 | if (!psd) |
@@ -40,7 +39,6 @@ int dev_pm_get_subsys_data(struct device *dev) | |||
40 | dev->power.subsys_data = psd; | 39 | dev->power.subsys_data = psd; |
41 | pm_clk_init(dev); | 40 | pm_clk_init(dev); |
42 | psd = NULL; | 41 | psd = NULL; |
43 | ret = 1; | ||
44 | } | 42 | } |
45 | 43 | ||
46 | spin_unlock_irq(&dev->power.lock); | 44 | spin_unlock_irq(&dev->power.lock); |
@@ -48,7 +46,7 @@ int dev_pm_get_subsys_data(struct device *dev) | |||
48 | /* kfree() verifies that its argument is nonzero. */ | 46 | /* kfree() verifies that its argument is nonzero. */ |
49 | kfree(psd); | 47 | kfree(psd); |
50 | 48 | ||
51 | return ret; | 49 | return 0; |
52 | } | 50 | } |
53 | EXPORT_SYMBOL_GPL(dev_pm_get_subsys_data); | 51 | EXPORT_SYMBOL_GPL(dev_pm_get_subsys_data); |
54 | 52 | ||