diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-06-03 22:27:17 +0200 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2013-11-15 13:52:56 +0900 |
commit | fe6649e2f44e0e7b88c8aa364bfc69de02cbb971 (patch) | |
tree | d3728dc532c385d7de771a2bfc2bbacf3a1cb982 | |
parent | 79d0d71df4df46c58308b31f18f2d0a0fecd3d05 (diff) | |
download | linux-3.10-fe6649e2f44e0e7b88c8aa364bfc69de02cbb971.tar.gz linux-3.10-fe6649e2f44e0e7b88c8aa364bfc69de02cbb971.tar.bz2 linux-3.10-fe6649e2f44e0e7b88c8aa364bfc69de02cbb971.zip |
pwm: devm: alloc correct pointer size
The allocated object should be the size of what the pointer is pointing
to and not the size of the pointer itself.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-rw-r--r-- | drivers/pwm/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 32221cb0cbe..0cf0f65eb03 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -694,7 +694,7 @@ struct pwm_device *devm_pwm_get(struct device *dev, const char *con_id) { struct pwm_device **ptr, *pwm; - ptr = devres_alloc(devm_pwm_release, sizeof(**ptr), GFP_KERNEL); + ptr = devres_alloc(devm_pwm_release, sizeof(*ptr), GFP_KERNEL); if (!ptr) return ERR_PTR(-ENOMEM); @@ -724,7 +724,7 @@ struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np, { struct pwm_device **ptr, *pwm; - ptr = devres_alloc(devm_pwm_release, sizeof(**ptr), GFP_KERNEL); + ptr = devres_alloc(devm_pwm_release, sizeof(*ptr), GFP_KERNEL); if (!ptr) return ERR_PTR(-ENOMEM); |