sound: fsl: add missing put_device() call in imx_hdmi_probe()
Subsystems (4)
PATCH 1/1 sound: fsl: add missing put_device() call in imx_hdmi_probe()
From: Wang Qing <[email protected]>
of_find_device_by_node() takes a reference to the embedded struct device which needs to be dropped when error return.
Signed-off-by Wang Qing <[email protected]>
--- sound/soc/fsl/imx-hdmi.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/fsl/imx-hdmi.c +1 -0
@@ -125,6 +125,7 @@ static int imx_hdmi_probe(struct platform_device *pdev) data =devm_kzalloc (&pdev->dev,sizeof (*data),GFP_KERNEL );if (!data) { +put_device (&cpu_pdev->dev); ret = -ENOMEM ; goto fail; }
Signature · 1 line
2.7.4
Mark Brown
maintainerQuoted 4 lines · Qing Wang
From: Wang Qing <[email protected]>
of_find_device_by_node()takes a reference to the embedded struct device which needs to be dropped when error return.
...
sound/soc/fsl/imx-hdmi.c static int imx_hdmi_probe(struct platform_device *pdev) · line 128
Quoted 3 lines
sound/soc/fsl/imx-hdmi.c +1
-0data =devm_kzalloc (&pdev->dev,sizeof (*data),GFP_KERNEL );if (!data) { +put_device (&cpu_pdev->dev);
If it's of_find_device_by_node() you need an of_node_put() since you're dropping a reference on the OF node.