summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorXin Xiong <xiongx18@fudan.edu.cn>2021-10-09 07:19:18 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2021-10-12 11:23:25 +0300
commit8105c2abbf36296bf38ca44f55ee45d160db476a (patch)
tree2d1e95e7ebdc14a5355ec07c087d323a660dd3db /drivers/pwm
parentf83c18cc9edc8e1a556de2d7dad956ddd9f131b9 (diff)
downloadlinux-8105c2abbf36296bf38ca44f55ee45d160db476a.tar.xz
mmc: moxart: Fix reference count leaks in moxart_probe
The issue happens in several error handling paths on two refcounted object related to the object "host" (dma_chan_rx, dma_chan_tx). In these paths, the function forgets to decrement one or both objects' reference count increased earlier by dma_request_chan(), causing reference count leaks. Fix it by balancing the refcounts of both objects in some error handling paths. In correspondence with the changes in moxart_probe(), IS_ERR() is replaced with IS_ERR_OR_NULL() in moxart_remove() as well. Signed-off-by: Xin Xiong <xiongx18@fudan.edu.cn> Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Link: https://lore.kernel.org/r/20211009041918.28419-1-xiongx18@fudan.edu.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/pwm')
0 files changed, 0 insertions, 0 deletions