mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
pwm: rockchip: fix the return value check of .get_biphasic_result()
Without this patch, the pclk may not be disabled if failed to
get biphasic counter result.
Fixes: 7a42db27aa ("pwm: rockchip: support for biphasic counter mode")
Change-Id: I5dd279fb1cbfc493531b95181464e2c7d3a4cea9
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
This commit is contained in:
@@ -1834,11 +1834,9 @@ int rockchip_pwm_get_biphasic_result(struct pwm_device *pwm, unsigned long *biph
|
||||
return ret;
|
||||
|
||||
ret = pc->data->funcs.get_biphasic_result(chip, pwm, biphasic_res);
|
||||
if (ret) {
|
||||
if (ret)
|
||||
dev_err(chip->dev, "Failed to get biphasic counter result for PWM%d\n",
|
||||
pc->channel_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
clk_disable(pc->pclk);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user