Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321544
b: refs/heads/master
c: 7725495
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Aug 8, 2012
1 parent a3c3242 commit 2cadc6f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d06a8a4fe7d81e8d1fa3d753be9b14c785b4b2e7
refs/heads/master: 77254950bb174d637cd88d1a74e137ecf3185a65
3 changes: 1 addition & 2 deletions trunk/drivers/base/power/clock_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ void pm_clk_init(struct device *dev)
*/
int pm_clk_create(struct device *dev)
{
int ret = dev_pm_get_subsys_data(dev);
return ret < 0 ? ret : 0;
return dev_pm_get_subsys_data(dev);
}

/**
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/base/power/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
int dev_pm_get_subsys_data(struct device *dev)
{
struct pm_subsys_data *psd;
int ret = 0;

psd = kzalloc(sizeof(*psd), GFP_KERNEL);
if (!psd)
Expand All @@ -40,15 +39,14 @@ int dev_pm_get_subsys_data(struct device *dev)
dev->power.subsys_data = psd;
pm_clk_init(dev);
psd = NULL;
ret = 1;
}

spin_unlock_irq(&dev->power.lock);

/* kfree() verifies that its argument is nonzero. */
kfree(psd);

return ret;
return 0;
}
EXPORT_SYMBOL_GPL(dev_pm_get_subsys_data);

Expand Down

0 comments on commit 2cadc6f

Please sign in to comment.