diff options
author | Yu Kuai <yukuai3@huawei.com> | 2020-10-09 15:37:58 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-16 12:31:09 +0300 |
commit | f28a81a3b64270da3588174feff4628c36e0ff4e (patch) | |
tree | 58a506c5fb8ddd820f8d06ffdfc7f878a6c6ed80 /drivers/media/platform/mtk-jpeg | |
parent | e91c255733d9bbb4978a372f44fb5ed689ccdbd1 (diff) | |
download | linux-f28a81a3b64270da3588174feff4628c36e0ff4e.tar.xz |
media: platform: add missing put_device() call in mtk_jpeg_clk_init()
if of_find_device_by_node() succeeds, mtk_jpeg_clk_init() doesn't have
a corresponding put_device(). Thus add put_device() to fix the exception
handling for this function implementation.
Fixes: 648372a87cee ("media: platform: Change the call functions of getting/enable/disable the jpeg's clock")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/mtk-jpeg')
-rw-r--r-- | drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index 227245ccaedc..106543391c46 100644 --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c @@ -1306,6 +1306,7 @@ static int mtk_jpeg_clk_init(struct mtk_jpeg_dev *jpeg) jpeg->variant->clks); if (ret) { dev_err(&pdev->dev, "failed to get jpeg clock:%d\n", ret); + put_device(&pdev->dev); return ret; } |