mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
media: vpif_capture: fix OF node reference imbalance
The driver reuses the OF node of the parent device but fails to take
another reference to balance the one dropped by the platform bus code
when unbinding the parent and releasing the child devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: 4a5f8ae50b ("[media] davinci: vpif_capture: get subdevs from DT when available")
Cc: stable@vger.kernel.org # 4.13
Cc: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
fe90217607
commit
2282f97956
|
|
@ -1498,7 +1498,7 @@ vpif_capture_get_pdata(struct platform_device *pdev,
|
|||
* video ports & endpoints data.
|
||||
*/
|
||||
if (pdev->dev.parent && pdev->dev.parent->of_node)
|
||||
pdev->dev.of_node = pdev->dev.parent->of_node;
|
||||
device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
|
||||
if (!IS_ENABLED(CONFIG_OF) || !pdev->dev.of_node)
|
||||
return pdev->dev.platform_data;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user