Commit bde2b96d authored by Fabien Dessenne's avatar Fabien Dessenne Committed by Mauro Carvalho Chehab

[media] bdisp: fix debug info memory access

bdisp_dev->dbg.copy_node shall be a copy of (and not point to)
bdisp_ctx->node, since this resource is freed upon driver release.
Signed-off-by: default avatarFabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 24310279
......@@ -768,12 +768,12 @@ static void bdisp_hw_save_request(struct bdisp_ctx *ctx)
/* Allocate memory if not done yet */
if (!copy_node[i]) {
copy_node[i] = devm_kzalloc(ctx->bdisp_dev->dev,
sizeof(*copy_node),
sizeof(*copy_node[i]),
GFP_KERNEL);
if (!copy_node[i])
return;
}
copy_node[i] = node[i];
*copy_node[i] = *node[i];
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment