Skip to content

Commit

Permalink
media: s5p_cec: decrement usage count if disabled
Browse files Browse the repository at this point in the history
[ Upstream commit 747bad54a677d8633ec14b39dfbeb859c821d7f2 ]

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 <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Fixes: 1bcbf6f ("[media] cec: s5p-cec: Add s5p-cec driver")
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
mchehab authored and gregkh committed Jul 20, 2021
1 parent 422d116 commit 057ea05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/media/s5p-cec/s5p_cec.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,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;
Expand Down

0 comments on commit 057ea05

Please sign in to comment.