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()
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user