Commit e2b588ab authored by Linus Torvalds's avatar Linus Torvalds

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()
parents a107bf8b 0e1614ac
...@@ -474,6 +474,7 @@ static int meson_pwm_probe(struct platform_device *pdev) ...@@ -474,6 +474,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
if (IS_ERR(meson->base)) if (IS_ERR(meson->base))
return PTR_ERR(meson->base); return PTR_ERR(meson->base);
spin_lock_init(&meson->lock);
meson->chip.dev = &pdev->dev; meson->chip.dev = &pdev->dev;
meson->chip.ops = &meson_pwm_ops; meson->chip.ops = &meson_pwm_ops;
meson->chip.base = -1; meson->chip.base = -1;
......
...@@ -425,6 +425,8 @@ void pwmchip_sysfs_unexport_children(struct pwm_chip *chip) ...@@ -425,6 +425,8 @@ void pwmchip_sysfs_unexport_children(struct pwm_chip *chip)
if (test_bit(PWMF_EXPORTED, &pwm->flags)) if (test_bit(PWMF_EXPORTED, &pwm->flags))
pwm_unexport_child(parent, pwm); pwm_unexport_child(parent, pwm);
} }
put_device(parent);
} }
static int __init pwm_sysfs_init(void) static int __init pwm_sysfs_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment