6.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Changhuang Liang <changhuang.liang@xxxxxxxxxxxxxxxx> [ Upstream commit 810dd605e917c716f6f83e6cd8ea23d9155d32a2 ] Need to remove links when unregistering devices. Fixes: ac7da4a73b10 ("media: staging: media: starfive: camss: Register devices") Signed-off-by: Changhuang Liang <changhuang.liang@xxxxxxxxxxxxxxxx> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> --- drivers/staging/media/starfive/camss/stf-camss.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/media/starfive/camss/stf-camss.c b/drivers/staging/media/starfive/camss/stf-camss.c index a587f860101ae..323aa70fdeaf1 100644 --- a/drivers/staging/media/starfive/camss/stf-camss.c +++ b/drivers/staging/media/starfive/camss/stf-camss.c @@ -162,6 +162,12 @@ static int stfcamss_register_devs(struct stfcamss *stfcamss) static void stfcamss_unregister_devs(struct stfcamss *stfcamss) { + struct stf_capture *cap_yuv = &stfcamss->captures[STF_CAPTURE_YUV]; + struct stf_isp_dev *isp_dev = &stfcamss->isp_dev; + + media_entity_remove_links(&isp_dev->subdev.entity); + media_entity_remove_links(&cap_yuv->video.vdev.entity); + stf_isp_unregister(&stfcamss->isp_dev); stf_capture_unregister(stfcamss); } -- 2.43.0