diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-07-07 10:17:56 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-07-07 10:17:56 +0200 |
commit | f1615bbe9be4def59c3b3eaddb60722efeed16c2 (patch) | |
tree | ca3020e65447576fc1826e819651e6ba072030b5 /drivers/hwmon/ultra45_env.c | |
parent | cfb3c0ab0903abb6ea5215b37eebd9c2a1f057eb (diff) | |
parent | cd3de83f147601356395b57a8673e9c5ff1e59d1 (diff) |
Merge tag 'v3.16-rc4' into drm-intel-next-queued
Due to Dave's vacation drm-next hasn't opened yet for 3.17 so I
couldn't move my drm-intel-next queue forward yet like I usually do.
Just pull in the latest upstream -rc to unblock patch merging - I
don't want to needlessly rebase my current patch pile really and void
all the testing we've done already.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/hwmon/ultra45_env.c')
-rw-r--r-- | drivers/hwmon/ultra45_env.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/hwmon/ultra45_env.c b/drivers/hwmon/ultra45_env.c index fb3e69341c1..7d465863606 100644 --- a/drivers/hwmon/ultra45_env.c +++ b/drivers/hwmon/ultra45_env.c @@ -252,7 +252,7 @@ static const struct attribute_group env_group = { static int env_probe(struct platform_device *op) { - struct env *p = kzalloc(sizeof(*p), GFP_KERNEL); + struct env *p = devm_kzalloc(&op->dev, sizeof(*p), GFP_KERNEL); int err = -ENOMEM; if (!p) @@ -262,7 +262,7 @@ static int env_probe(struct platform_device *op) p->regs = of_ioremap(&op->resource[0], 0, REG_SIZE, "pic16f747"); if (!p->regs) - goto out_free; + goto out; err = sysfs_create_group(&op->dev.kobj, &env_group); if (err) @@ -286,8 +286,6 @@ out_sysfs_remove_group: out_iounmap: of_iounmap(&op->resource[0], p->regs, REG_SIZE); -out_free: - kfree(p); goto out; } @@ -299,7 +297,6 @@ static int env_remove(struct platform_device *op) sysfs_remove_group(&op->dev.kobj, &env_group); hwmon_device_unregister(p->hwmon_dev); of_iounmap(&op->resource[0], p->regs, REG_SIZE); - kfree(p); } return 0; |