diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-30 22:53:50 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-30 22:53:50 +0300 |
commit | e2b588ab60c797d327551d9aaca914f962d5194b (patch) | |
tree | 3cb080213714bacd213dbe6132dbd282cd9a1b5a | |
parent | a107bf8b3905b61bf8b5c181268bca8c05af7f69 (diff) | |
parent | 0e1614ac84f1719d87bed577963bb8140d0c9ce8 (diff) | |
download | linux-e2b588ab60c797d327551d9aaca914f962d5194b.tar.xz |
Merge tag 'pwm/for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm fixes from Thierry Reding:
"This contains two one-line fixes for issues that were introduced in
v4.9-rc1"
* tag 'pwm/for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
pwm: Fix device reference leak
pwm: meson: Add missing spin_lock_init()
-rw-r--r-- | drivers/pwm/pwm-meson.c | 1 | ||||
-rw-r--r-- | drivers/pwm/sysfs.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c index 381871b2bb46..9d5bd7d5c610 100644 --- a/drivers/pwm/pwm-meson.c +++ b/drivers/pwm/pwm-meson.c @@ -474,6 +474,7 @@ static int meson_pwm_probe(struct platform_device *pdev) if (IS_ERR(meson->base)) return PTR_ERR(meson->base); + spin_lock_init(&meson->lock); meson->chip.dev = &pdev->dev; meson->chip.ops = &meson_pwm_ops; meson->chip.base = -1; diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c index 0296d8178ae2..a813239300c3 100644 --- a/drivers/pwm/sysfs.c +++ b/drivers/pwm/sysfs.c @@ -425,6 +425,8 @@ void pwmchip_sysfs_unexport_children(struct pwm_chip *chip) if (test_bit(PWMF_EXPORTED, &pwm->flags)) pwm_unexport_child(parent, pwm); } + + put_device(parent); } static int __init pwm_sysfs_init(void) |