mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
media: ti: j721e-csi2rx: Use devm_of_platform_populate
Ensure that we clean up the platform bus when we remove this driver.
This fixes a crash seen when reloading the module for the child device
with the parent not yet reloaded.
Fixes: b4a3d877dc ("media: ti: Add CSI2RX support for J721E")
Cc: stable@vger.kernel.org
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
Tested-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com> (on SK-AM68)
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
bdc9776dac
commit
072799db23
|
|
@ -1120,7 +1120,7 @@ static int ti_csi2rx_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
goto err_vb2q;
|
||||
|
||||
ret = of_platform_populate(csi->dev->of_node, NULL, NULL, csi->dev);
|
||||
ret = devm_of_platform_populate(csi->dev);
|
||||
if (ret) {
|
||||
dev_err(csi->dev, "Failed to create children: %d\n", ret);
|
||||
goto err_subdev;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user