Message ID | a1c4c8a65061897f66ef119ddfd8ae858eec8a6d.1620207353.git.mchehab+huawei@kernel.org |
---|---|
State | Accepted |
Commit | 747bad54a677d8633ec14b39dfbeb859c821d7f2 |
Headers | show |
Series | [01/25] staging: media: rkvdec: fix pm_runtime_get_sync() usage count | expand |
On Wed, 5 May 2021 11:41:54 +0200 Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote: > There's a bug at s5p_cec_adap_enable(): if called to > disable the device, it should call pm_runtime_put() > instead of pm_runtime_disable(), as the goal here is to > decrement the usage_count and not to disable PM runtime. > > Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com> > Fixes: 1bcbf6f4b6b0 ("[media] cec: s5p-cec: Add s5p-cec driver") > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > drivers/media/cec/platform/s5p/s5p_cec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/cec/platform/s5p/s5p_cec.c b/drivers/media/cec/platform/s5p/s5p_cec.c > index 2a3e7ffefe0a..3c7c4c3c798c 100644 > --- a/drivers/media/cec/platform/s5p/s5p_cec.c > +++ b/drivers/media/cec/platform/s5p/s5p_cec.c > @@ -51,7 +51,7 @@ static int s5p_cec_adap_enable(struct cec_adapter *adap, bool enable) > } else { > s5p_cec_mask_tx_interrupts(cec); > s5p_cec_mask_rx_interrupts(cec); > - pm_runtime_disable(cec->dev); > + pm_runtime_put(cec->dev); > } > > return 0;
diff --git a/drivers/media/cec/platform/s5p/s5p_cec.c b/drivers/media/cec/platform/s5p/s5p_cec.c index 2a3e7ffefe0a..3c7c4c3c798c 100644 --- a/drivers/media/cec/platform/s5p/s5p_cec.c +++ b/drivers/media/cec/platform/s5p/s5p_cec.c @@ -51,7 +51,7 @@ static int s5p_cec_adap_enable(struct cec_adapter *adap, bool enable) } else { s5p_cec_mask_tx_interrupts(cec); s5p_cec_mask_rx_interrupts(cec); - pm_runtime_disable(cec->dev); + pm_runtime_put(cec->dev); } return 0;
There's a bug at s5p_cec_adap_enable(): if called to disable the device, it should call pm_runtime_put() instead of pm_runtime_disable(), as the goal here is to decrement the usage_count and not to disable PM runtime. Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Fixes: 1bcbf6f4b6b0 ("[media] cec: s5p-cec: Add s5p-cec driver") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> --- drivers/media/cec/platform/s5p/s5p_cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)