mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 00:34:52 +00:00
Merge branch 'for-4.7/pwm-cleanup' into for-next
This commit is contained in:
commit
c3499f0bc3
1 changed files with 2 additions and 1 deletions
|
@ -75,6 +75,7 @@ static void free_pwms(struct pwm_chip *chip)
|
|||
|
||||
for (i = 0; i < chip->npwm; i++) {
|
||||
struct pwm_device *pwm = &chip->pwms[i];
|
||||
|
||||
radix_tree_delete(&pwm_tree, pwm->pwm);
|
||||
}
|
||||
|
||||
|
@ -254,7 +255,7 @@ int pwmchip_add_with_polarity(struct pwm_chip *chip,
|
|||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
chip->pwms = kzalloc(chip->npwm * sizeof(*pwm), GFP_KERNEL);
|
||||
chip->pwms = kcalloc(chip->npwm, sizeof(*pwm), GFP_KERNEL);
|
||||
if (!chip->pwms) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
|
|
Loading…
Add table
Reference in a new issue