From: Yu Kuai Date: Fri, 9 Oct 2020 12:37:58 +0000 (+0200) Subject: media: platform: add missing put_device() call in mtk_jpeg_clk_init() X-Git-Tag: v5.10.7~829 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7ffc289daa3fb264e271b3a5b4f533a61f91e9c;p=platform%2Fkernel%2Flinux-rpi.git media: platform: add missing put_device() call in mtk_jpeg_clk_init() [ Upstream commit f28a81a3b64270da3588174feff4628c36e0ff4e ] 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index 227245c..1065433 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; }